Message ID | 4b6eaac8dd2053e14eedf957f446dc30ccfdbc75.1694093327.git.geert@linux-m68k.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ab0a:0:b0:3f2:4152:657d with SMTP id m10csp38455vqo; Thu, 7 Sep 2023 10:18:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE6+kWyX7EVdVHSmzszdFtobUi6H04Coj0t1vbMYPJdFBtYIB8H0FfEXqNqTvzFeNqQTTmG X-Received: by 2002:a6b:6509:0:b0:787:1a8f:1d08 with SMTP id z9-20020a6b6509000000b007871a8f1d08mr362329iob.15.1694107115463; Thu, 07 Sep 2023 10:18:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694107115; cv=none; d=google.com; s=arc-20160816; b=Wwg1V5+t3nemJSqTK18+hkUS/tfx94ssMlZoVER65YH6x7FyFKwMGoXrdulRLwOTZ/ Kq+iUXVxkhMSbHh/L3DwkO374pVz6yThG24tlOLYdrWsAU6T5hAG9EgaInf9QR1PYrbA Mqly4+sJt5bwecS9fD6Few194ID3VWmUww/RipxQJ+YWwg8MLSGgIn9buzZa3QMS71EP zTgBdvOcYUfFUtyWizAHIvESEfRXUMkp7IhvQjI1v1qjmItLFNpBhNOuUu/HkyXE9cYx +zgYsRwJK0bQZQpIJKUZHBS4ekz604W7Hx8HsBXtDFTZ0G/E1w7oZ9NEiqplTH7j5xUC 8gNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=JaZAlf9kr+OViGhMHTZWK9viG7iibEl4HQ6LwogRWXo=; fh=fKMC3BTGjlLXl5EvEhzqt3WHCynqYJKK7wAqLAOkWUw=; b=ZmW7pry36zsBFpJNNjc/s8IiGX6nJBnfXBr27vwb6f9dncLmOhTB6x/5CuWcqzfFYW +KfIkPuggpIw678XsTngB0MWkBIXOfKSi8h0iRWMPKGC3MJAmSPisQ/ZKmE8c0NL2n/l 6a+Vh1HiZT3oMpFfHPVEJKOU0N29Am5N0V9rUbtlFZw43S3UxqRNLfiAtnQHnnlw/CU2 DmZn+YWJAFnLaaAakVzWuOp9TUwcdoliQGi+JoC9mnm4BgtHuL99LKgZchTG8aInAhs6 tB6xbUCOQRVFQJnV8UA99k70BziAGgAbT1jRAd6CHDGMO3N5BxEILNxgmsShXC1zs2j1 jdjw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z12-20020a634c0c000000b0056679c8e70csi231284pga.272.2023.09.07.10.18.29; Thu, 07 Sep 2023 10:18:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237306AbjIGQXv (ORCPT <rfc822;ouuuleilei@gmail.com> + 37 others); Thu, 7 Sep 2023 12:23:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241490AbjIGQWb (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 7 Sep 2023 12:22:31 -0400 Received: from weierstrass.telenet-ops.be (weierstrass.telenet-ops.be [IPv6:2a02:1800:110:4::f00:11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80E506A44 for <linux-kernel@vger.kernel.org>; Thu, 7 Sep 2023 09:19:52 -0700 (PDT) Received: from xavier.telenet-ops.be (xavier.telenet-ops.be [IPv6:2a02:1800:120:4::f00:14]) by weierstrass.telenet-ops.be (Postfix) with ESMTPS id 4RhL6D04PRz4x30m for <linux-kernel@vger.kernel.org>; Thu, 7 Sep 2023 15:43:00 +0200 (CEST) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:c214:2eac:128d:f67e]) by xavier.telenet-ops.be with bizsmtp id j1hx2A00C2mGBSJ011hxwm; Thu, 07 Sep 2023 15:41:59 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from <geert@linux-m68k.org>) id 1qeFGQ-002m8k-Cg; Thu, 07 Sep 2023 15:41:57 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from <geert@linux-m68k.org>) id 1qeFGf-00CMgI-Ko; Thu, 07 Sep 2023 15:41:57 +0200 From: Geert Uytterhoeven <geert@linux-m68k.org> To: linux-m68k@lists.linux-m68k.org Cc: Arnd Bergmann <arnd@arndb.de>, Finn Thain <fthain@linux-m68k.org>, Michael Schmitz <schmitzmic@gmail.com>, Philip Blundell <philb@gnu.org>, Greg Ungerer <gerg@linux-m68k.org>, Joshua Thompson <funaho@jurai.org>, Sam Creasey <sammy@sammy.net>, Laurent Vivier <laurent@vivier.eu>, linux-kernel@vger.kernel.org, Geert Uytterhoeven <geert@linux-m68k.org> Subject: [PATCH 16/52] m68k: amiga: pcmcia: Replace set but not used variable by READ_ONCE() Date: Thu, 7 Sep 2023 15:41:17 +0200 Message-Id: <4b6eaac8dd2053e14eedf957f446dc30ccfdbc75.1694093327.git.geert@linux-m68k.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <cover.1694093327.git.geert@linux-m68k.org> References: <cover.1694093327.git.geert@linux-m68k.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776400062454049915 X-GMAIL-MSGID: 1776400062454049915 |
Series |
None
|
|
Commit Message
Geert Uytterhoeven
Sept. 7, 2023, 1:41 p.m. UTC
When building with W=1:
arch/m68k/amiga/pcmcia.c: In function ‘pcmcia_reset’:
arch/m68k/amiga/pcmcia.c:29:23: warning: variable ‘b’ set but not used [-Wunused-but-set-variable]
29 | unsigned char b;
| ^
Fix this by using READ_ONCE(), and removing the variable.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
arch/m68k/amiga/pcmcia.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/m68k/amiga/pcmcia.c b/arch/m68k/amiga/pcmcia.c index 7106f0c3639bc105..63cce6b590df4dcb 100644 --- a/arch/m68k/amiga/pcmcia.c +++ b/arch/m68k/amiga/pcmcia.c @@ -26,11 +26,10 @@ static unsigned char cfg_byte = GAYLE_CFG_0V|GAYLE_CFG_150NS; void pcmcia_reset(void) { unsigned long reset_start_time = jiffies; - unsigned char b; gayle_reset = 0x00; while (time_before(jiffies, reset_start_time + 1*HZ/100)); - b = gayle_reset; + READ_ONCE(gayle_reset); } EXPORT_SYMBOL(pcmcia_reset);