From patchwork Fri Dec 10 00:22:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 12695545 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 B7A06C433F5 for ; Fri, 10 Dec 2021 00:25:07 +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=xsfE5Z0c+ZahBG5M5kM8OFUkOttURl46pgQpG8hRxIs=; b=DNaR3AHrmWKN40 k6W8WLNjZvWhtuXIWHSeAjFuXX7ZjlMew5EqQbf+xzKMI1ciM29wCoFwySosqOFfXyk7+xeTE1QUA f1evwe933ytBC9fMTWaJIKUt3OzjTGs8SXbY6BSxOeT/6SkjVqkwcqGTBl/EL5VEgOm127HZRferX s1RJRvSGc8yvaymMKU0hXY/viVrecFxllqeP9jUDXKCcAKDAQ8xtoRaPby3ibhhklkj0DFICFJ7PR UNpfkJLpO1O6I6Oa10eyLpnWQe/cgvxrnqkqMcT01PbRo8J97ygt1tsOO+MwF+y9c1WuzjK4TIL+h 7XwgSNyLqTvfsLTaCxpA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mvTgf-000Tg1-Ad; Fri, 10 Dec 2021 00:22:57 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mvTgb-000Tfc-M2 for linux-arm-kernel@lists.infradead.org; Fri, 10 Dec 2021 00:22:54 +0000 Received: by mail-wr1-x430.google.com with SMTP id t9so12470735wrx.7 for ; Thu, 09 Dec 2021 16:22:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=cdBf1B+Hmwd5PFbci4WK17kIT5lJDcYDTMQv5xnAW20=; b=XGl4tq5LgiZbSqKAOn+ysQaWs9Ud00eLcjg8LQL63s1N9VJpwojM+ii3ZCj9jrbTFf 7/xZS/XN+38lmzQKcoxF37REFWCB/xJFeCn6QAoXXDpwNuayPb9vI4V7BSrh5DrGUBTx FVQFtGeOftnqB0okfbnHchQW6tVLkc+nYKhYbqskQlXhyRfb1UhY6jF4/t3dvL/u7xy6 Hc/3foigwLLY5w05CkCJC6ZBzbKdQRA4mzVfUSk1rqAwdaC361dMs9PmP0tVz6DVfmn2 TCaWg2UPbFltGB4oKG8bNwHXUe2C2crA467AGOmk4gcDZ0GZOyfZiq4FquHW9tFp+Ias ha0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=cdBf1B+Hmwd5PFbci4WK17kIT5lJDcYDTMQv5xnAW20=; b=41aYr9pAZ9lO2gNw7RsL3ywOptphFqw0LqNuEVoamxC1hNeR6ozPIbA18qxmM1b31f eMFaDK9XCEkcPk/icUf/c8Xzy2RMS41C1rbMH2zEo1m9RsrqKG///8ynar3A813YCNrY GMvFh9uJiZ6pPiRUC7TSCn9iF/03gMq6taxULnhJQnTIzV8/JLPEXY1JIFaqmGMB7Psy la4obRby8x1ptbQ78tPsCCTzXyhbVqDW2Cx1MHSKsrdEh/32yZygufwqaz9SCd6u9TCm G4oZYHRHs97RKdljxgtL6jvyueTLySs1k+2HaOEMx3KmjQcquuRHuhzcamUvMvP5XoHF 10GA== X-Gm-Message-State: AOAM531lNe9gYqGxVIA3Zy9fRpMYAt5kORbXKwa5lXzPIc6DKFLH02lr +SXuW0TSaFH9mL84fWysigQ= X-Google-Smtp-Source: ABdhPJzWzdcnndKgHrrbfchtD2CenirzjjQWpiV0qB3iXOCkjaAAb2cyvHup07E4RiiJpmpypLoPdw== X-Received: by 2002:adf:cd06:: with SMTP id w6mr10503491wrm.431.1639095771325; Thu, 09 Dec 2021 16:22:51 -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 g13sm1525012wrd.57.2021.12.09.16.22.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Dec 2021 16:22:51 -0800 (PST) From: Colin Ian King To: Claudiu Beznea , Thierry Reding , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Lee Jones , Nicolas Ferre , Alexandre Belloni , Ludovic Desroches , linux-arm-kernel@lists.infradead.org, linux-pwm@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] pwm: atmel: remove redundant initialization of variable timeout Date: Fri, 10 Dec 2021 00:22:50 +0000 Message-Id: <20211210002250.639251-1-colin.i.king@gmail.com> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211209_162253_778322_6CFD2EFE X-CRM114-Status: GOOD ( 14.00 ) 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 The variable timeout is being initialized with a value that is never read, it is being re-assigned the same value later on. Remove the redundant initialization and keep the latter assignment because it's closer to the use of the variable. Signed-off-by: Colin Ian King Reviewed-by: Uwe Kleine-König --- drivers/pwm/pwm-atmel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pwm/pwm-atmel.c b/drivers/pwm/pwm-atmel.c index 98b34ea9f38e..8e00a4286145 100644 --- a/drivers/pwm/pwm-atmel.c +++ b/drivers/pwm/pwm-atmel.c @@ -271,7 +271,7 @@ static void atmel_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm, bool disable_clk) { struct atmel_pwm_chip *atmel_pwm = to_atmel_pwm_chip(chip); - unsigned long timeout = jiffies + 2 * HZ; + unsigned long timeout; atmel_pwm_wait_nonpending(atmel_pwm, pwm->hwpwm);