From patchwork Wed Jan 10 10:20:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13515902 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A7779C3DA6E for ; Wed, 10 Jan 2024 10:22:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Ai+b+ZlhVVEEGSqtWn9nfPq/GYmSJ35EcnWDCZjHaAM=; b=kGg5v9wrseTD/m keWmWHXCyYASBK9odjt2UTMa9STp5lbXlsCZkWnEof4styOMqK22Y76s6OO2KrnAEx35zKQe5DgE8 6KaEU9XnZBOBh4ZAQ7CaGhdqYAHPOudUWWJqsPqrghDgJA4QYYHMQyVC12bfxaroQcnA7SDtW2OYq 5uKuG6rbJUiznKtYHgMVmpXhmZ6TxkT/UTrbcP/utJExGGTZpEP6GU54DpeU/j2p7Pvu2TCaBdlnp C8NesNzRTXQPMkZCYK3IwZ3j6GYc25KvGtFUNQTeGJri03Zbp+PEqRe1uhyqaUPt/rLWyw4J9Werl ti0Sv0SxWgY6qurdz3ng==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rNViN-00B0Lh-3D; Wed, 10 Jan 2024 10:21:40 +0000 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rNVi0-00B01e-26 for linux-arm-kernel@lists.infradead.org; Wed, 10 Jan 2024 10:21:19 +0000 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-40e5770d34fso3221415e9.3 for ; Wed, 10 Jan 2024 02:21:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704882075; x=1705486875; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2v2KRYXA+keXRfq45rf7VwhlRc8wCU8IH+wWuas1Yt0=; b=pdAw+I48nGFGi3nxf70cjL07SUUaZmh3xMbgpd6KaTUtICvRmiSDLuhXotiwsE3VJh DTw28YFIm0BbIrrfyM72cde7VxANkwghzC7krRliu8WosoQju5MnnO1XrS6M2C0JCmzW c/KeMowLTC/kNcjmLGtvrBKtcK0afe3ctlZD5el3vNTRH8T38Mx7czWPWyijtPP7MvD+ g5hVD4jxs+/sJCrGKtH44Inrcfekpt6RO15NuhaL9U7/vU92zwYjlpG3zVFZkQfWCzSH mHOjlhILs92xQAQTUGKVNNU7c1CS7/pmGrtuplbP+3knlcXGJCp6rJVLyN/zQj5+fF3L xGFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704882075; x=1705486875; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2v2KRYXA+keXRfq45rf7VwhlRc8wCU8IH+wWuas1Yt0=; b=qsv2/L63mBdB7J7pQzLE61d01O6P9vC0Qv5+TsndxdFiI4TMMhhru+eNohBI0HOoJ9 ufXA1cqQIyJj2+a5cfmMZAnmKLfcYQqJxa5SeiSGCBauGIsmSDvAb877H5xm6EVYHHHr r3cEWqZf45/RXzSqDJzGbvUQAPgCStopjyPih/EgD1twgzaTytbvd/hjd3AbQk5CY5kB 18zshVJ8TERXmcsk1Ymjxiv9vbkKM6Q96VK4xZCI6gBKNfxvqNV9ZcfLNUZoE/OrXMW8 RxGxyNoNBuMUw7+q8nA7HljaTRHcRBMTZkSRkFWR0jrtu3ZYpu+mKiE9DkESJH09ykKZ h/0w== X-Gm-Message-State: AOJu0Yyhhh//6KImKaxqWqrN9+b45vgEHTaLAFpsWU+MxyzEUETgSpO2 8/JpTpqbme5jJQij9pNyVcgQvznrTpywJw== X-Google-Smtp-Source: AGHT+IGLeDeKQhsCLP5+R4lOabowbyfiHLzCDX82nYtvoNIupA5AR/1fHezyqisxDb7TJ9bwCXPMhA== X-Received: by 2002:a05:600c:1d95:b0:40e:4084:b948 with SMTP id p21-20020a05600c1d9500b0040e4084b948mr414155wms.94.1704882075513; Wed, 10 Jan 2024 02:21:15 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id j7-20020a05600c190700b0040e52cac976sm1625302wmq.29.2024.01.10.02.21.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 02:21:15 -0800 (PST) From: Tudor Ambarus To: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH 10/18] tty: serial: samsung: make max_count unsigned int Date: Wed, 10 Jan 2024 10:20:54 +0000 Message-ID: <20240110102102.61587-11-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog In-Reply-To: <20240110102102.61587-1-tudor.ambarus@linaro.org> References: <20240110102102.61587-1-tudor.ambarus@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240110_022118_107897_96446461 X-CRM114-Status: GOOD ( 11.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org ``max_count`` negative values are not used. Since ``port->fifosize`` is an unsigned int, make ``max_count`` the same. Signed-off-by: Tudor Ambarus Reviewed-by: Sam Protsenko --- drivers/tty/serial/samsung_tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index 90c49197efc7..dbbe6b8e3ceb 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -760,8 +760,8 @@ static irqreturn_t s3c24xx_serial_rx_chars_dma(void *dev_id) static void s3c24xx_serial_rx_drain_fifo(struct s3c24xx_uart_port *ourport) { struct uart_port *port = &ourport->port; + unsigned int max_count = port->fifosize; unsigned int fifocnt = 0; - int max_count = port->fifosize; u32 ufcon, ufstat, uerstat; u8 ch, flag;