From patchwork Wed Oct 15 00:36:31 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: roel kluin X-Patchwork-Id: 4490 X-Patchwork-Delegate: benh@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id F03CADEA67 for ; Wed, 15 Oct 2008 05:37:23 +1100 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.152]) by ozlabs.org (Postfix) with ESMTP id 76BE2DE8A9 for ; Wed, 15 Oct 2008 05:36:36 +1100 (EST) Received: by fg-out-1718.google.com with SMTP id d23so1741224fga.39 for ; Tue, 14 Oct 2008 11:36:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=KEqIb0m2jizgzH33sxYs3RTs8BV5J8o0x37CTXnNkiI=; b=KQARdBGw8M+v7X3hsOT7NyzV1V7tB3xDaGLdSH43dahEcyeoYkxgFrlr+x4L7tYrXK nd/wyckqBFqQ4kv8lA/oJRBw334HJLYgPO01cpzHLdqqqxX2GsbSGMB4Wgz2JIBuFEzX 3XMCbwk4j7prtI63ZhODx9BuzEixVr4OnZmMQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=vuNwAZ1mfTPA9w/Po5V3yifTZ/r7Kvo83+5J4JdriwNp40TwZ6DmEULxY9OLGKnkI3 jY/wZS7IA3MCoU+WE4HqpqwDVuMPcodJaWbwuGW9GDUtFWpLMdEawyQ8AjQI+HEEa1ku 7PUMJUcdhs5BH9Q561IFaONwz7cO10Kuxo8t0= Received: by 10.181.55.3 with SMTP id h3mr6206212bkk.90.1224009394026; Tue, 14 Oct 2008 11:36:34 -0700 (PDT) Received: from ?192.168.1.117? (d133062.upc-d.chello.nl [213.46.133.62]) by mx.google.com with ESMTPS id f4sm43007619nfh.27.2008.10.14.11.36.32 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 14 Oct 2008 11:36:32 -0700 (PDT) Message-ID: <48F53B0F.5010301@gmail.com> Date: Tue, 14 Oct 2008 20:36:31 -0400 From: roel kluin User-Agent: Mozilla-Thunderbird 2.0.0.9 (X11/20080110) MIME-Version: 1.0 To: benh@kernel.crashing.org, linuxppc-dev@ozlabs.org Subject: [PATCH] [POWERPC] unsigned speed cannot be negative X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org unsigned speed cannot be negative Signed-off-by: Roel Kluin --- N.B. It could be possible that a different fix is needed. diff --git a/arch/powerpc/kernel/udbg_16550.c b/arch/powerpc/kernel/udbg_16550.c index cb01ebc..7b7da8c 100644 --- a/arch/powerpc/kernel/udbg_16550.c +++ b/arch/powerpc/kernel/udbg_16550.c @@ -142,7 +142,7 @@ unsigned int udbg_probe_uart_speed(void __iomem *comport, unsigned int clock) speed = (clock / prescaler) / (divisor * 16); /* sanity check */ - if (speed < 0 || speed > (clock / 16)) + if (speed > (clock / 16)) speed = 9600; return speed;