From patchwork Thu Feb 15 23:29:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 13559284 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 6B119C4829E for ; Thu, 15 Feb 2024 23:30: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: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:In-Reply-To:References: List-Owner; bh=fCqizpLNrrOzFdH/zTne8pwYF9LAhXCUMjiNB2GPVh0=; b=yH5dngy36YbxXJ xYIhM+fjbtVEkY/dfmAov6jxb8tXriwbxW0T35fQJ+MfGQVorUkDdECqbNXBODmkfFvhKKPHHxB6R 9rMDmKvqg+u1bQ+Jj4ADB7pjOaodsvd77ERO4SueqKnwdI0TfGtumMFJKTWhXZ4QHPCZvOIu8YcHL B656Bg5i2LcMv4qqms5ejniHwNkAuxa+hgmHJ7JuJEp3jWUe7UXmPgHjAk5fVK4H3GLk+//CyelsD +Q+MjIsmw7hDuUFHmTLMMdo+NImo1jr4RVcUNeeRUwTeKipZlmMg3eIj88gA6tFku3wFsa3SWqB+c zWDZGLBEqVhD3d9wlw4A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ralAs-00000000TSs-41BK; Thu, 15 Feb 2024 23:29:50 +0000 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ralAq-00000000TSO-2KSL for linux-arm-kernel@lists.infradead.org; Thu, 15 Feb 2024 23:29:50 +0000 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-3394b892691so997305f8f.1 for ; Thu, 15 Feb 2024 15:29:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708039787; x=1708644587; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=j5Bj9xsaXMX+Tu65Jo5x7Ok2Dy8ft8+EqH3kfAe/1a0=; b=S8c2rm90Ve2XR7Brcqv8AvWoPQQJvqh9jU6OMnSJPzQ+DFK3EWZI3suLs4+9wuN/Us HqrJc3cjIaPE0u8LjgT3oLUB/0Dw8j9HrpBZIR8aDaq5gV66wNnxWzivxS8ONPyqK4Sx AzDgbQOd88XT8/TvjuOoJEmE9YzK0m867bPjSWflfvQp/q/dvPADYzKoMLmOJ7ZiYtZr EW8TIpKq2zNS07ifAKX5m97+NZw8qMlgV9NFJOGb5Vr9buPJBsTaS+2Y+aa+1D7ndy6z f3hno1v/r6m4QxcdOg4tAunRCy8d2CsRs2rJb/6LJRvJ6hs6FtNDEZRxev5VIsVjfsKE iHVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708039787; x=1708644587; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=j5Bj9xsaXMX+Tu65Jo5x7Ok2Dy8ft8+EqH3kfAe/1a0=; b=r110wykLikGdpKdx66XbSYebt6ArHIxY93b2Gd7mBzUPHn4ydbW9eE5PM3n4itqM7H lMbL8dTuhHAmZFVebfkaBH5zTeZP1fm5oANQmOec5rIF54ctGIYLeWxWerAtW61zKlt1 2kDIa86lSXZEhaHtKIbb6DDCCljpc6A1tdbk394u/oMpmXKwiMK6jGHfkgP7iVDBGppi wUtyQM3MRJf6Z3+j8F1LmWzYjcYEO1kKpvbROvN0DZ5xq3fT3DjpPRF5b4GZTEmqy25l OgsayWonwmykZnJdBHJkK/4M1bhb8s4r0Hl8QAfwVjLQJgclQZjYUQ5BQjAOqafDw6UP IM7g== X-Forwarded-Encrypted: i=1; AJvYcCXzNyUD2idld04oYi7q+OwwpoCJi0ucFxTByl6cnSpDZ7aCXIaRR938VxDp6VDgIdChBVZ0M9MS1O0Kuv6UA1fPZOemILl3VuuqJu9224dNogI9pak= X-Gm-Message-State: AOJu0Yx9/4rzR75R5jdaFjci3Hb0uZSMvgGL9tq9gZL2+p+oFTFfAbUK tDKtgb46zI++VUI1xmCgclAzpFlF3V2U2BWeFqZ82SNCbzjwMe9y X-Google-Smtp-Source: AGHT+IFClw2R/gW7b2Gk9VgkZuerndh8UZ6w1NSexmCjQ9JO9ycquNjWnTRLIHCIgXks/FEKHA6Rmg== X-Received: by 2002:adf:cf04:0:b0:33b:6959:c766 with SMTP id o4-20020adfcf04000000b0033b6959c766mr2630764wrj.29.1708039786517; Thu, 15 Feb 2024 15:29:46 -0800 (PST) Received: from localhost (cpc154979-craw9-2-0-cust193.16-3.cable.virginm.net. [80.193.200.194]) by smtp.gmail.com with ESMTPSA id t12-20020a5d460c000000b0033b48190e5esm455092wrq.67.2024.02.15.15.29.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 15:29:45 -0800 (PST) From: Colin Ian King To: Greg Kroah-Hartman , Jiri Slaby , Vladimir Zapolskiy , linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH][next] serial: lpc32xx_hs: remove redundant check and assignment of hsu_rate Date: Thu, 15 Feb 2024 23:29:44 +0000 Message-Id: <20240215232944.2075789-1-colin.i.king@gmail.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240215_152948_618329_D06C5751 X-CRM114-Status: GOOD ( 12.37 ) 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 Variable hsu_rate is being checked for an upper limit and is assigned a value that is never read. The if statement and assignment are redundant and can be removed. Cleans up clang scan build warning: drivers/tty/serial/lpc32xx_hs.c:237:3: warning: Value stored to 'hsu_rate' is never read [deadcode.DeadStores] Signed-off-by: Colin Ian King --- drivers/tty/serial/lpc32xx_hs.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/tty/serial/lpc32xx_hs.c b/drivers/tty/serial/lpc32xx_hs.c index ec20329f0603..269efc5e2d51 100644 --- a/drivers/tty/serial/lpc32xx_hs.c +++ b/drivers/tty/serial/lpc32xx_hs.c @@ -233,8 +233,6 @@ static unsigned int __serial_get_clock_div(unsigned long uartclk, hsu_rate++; } - if (hsu_rate > 0xFF) - hsu_rate = 0xFF; return goodrate; }