Message ID | 20230313065823.256731-1-dzm91@hust.edu.cn |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1041130wrd; Mon, 13 Mar 2023 00:15:09 -0700 (PDT) X-Google-Smtp-Source: AK7set8xHGWkwE/MqrqS4EQuaOxmawiesc9AAILpx6mpm4V6oPY/Nzp/mPCqKoZ/pS1gRzCw3EPR X-Received: by 2002:a17:902:d50a:b0:1a0:5652:6168 with SMTP id b10-20020a170902d50a00b001a056526168mr465257plg.58.1678691709082; Mon, 13 Mar 2023 00:15:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678691709; cv=none; d=google.com; s=arc-20160816; b=MiABnpl+7YRAXWEAXAdcyRiMt0tCqAGjZIkoWNNThSL1z59QFX3MOnpRs9G2Y9GhQ8 DbMfK5WwOMl39/PB3tjmGwaD3F3Hj6fGPapY9gUo+5avqqspcSgd+Ioj6QvbwRGhWpCR zxVDH4NeyVvmYJGNW0tXSFSY4ojK096BWvxEuSOy8ztLkSw2/KIQKEr2QDvBf64SFWEw HCchCifSHe8+17bU/jaN7Km1z/xuIXSABtuL9VHR5dx7rfHozia42pnQ0zUVHEPnIExF xAHe8lEMTk4luGsUFj4qdHSFS3LVp8dt9H/nDFmFcFtE6hRqFgD8Nymy5MDzZZzwZmWw 8Dkg== 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 :message-id:date:subject:cc:to:from; bh=1Ca5EX6hVOmiHztL8eQDvx3c76OSpJCJcaAPk2hP6Rw=; b=VHRSxJoD3ueZ54V3Lr4b3+W5Yl1GTw+tPzSX4WIAQxBmtN3DPhnoAYCQzJox7qZ0WK tBQPktcRFlRn2KNWXmv6y/JWsyEHdvnZ/O5ol4xBuQBEij5BBD+GHw66FnXBze8nJFOb KuL57Y2TjSZjLNTiusRUolFUT0X3Lx6slZY5DM5rKtDU+Me3/m89CWxh4+NFa6gFGpPs oESlBPFO1jTizzrqtmjV0qT2IvULXw4JNEvKIOKitisZgS5On620THyZ7IZB/rn456rZ oNpp5snOQFgfZVTrOelJTHR2eqh5XwA89j59V8Fo3JMzvbpjbRt6Y+QqQyw14wu1oaSw wLAQ== 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 p17-20020a170902e75100b0017a0e7aaf6bsi5548944plf.128.2023.03.13.00.14.54; Mon, 13 Mar 2023 00:15:09 -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 S229838AbjCMHB4 (ORCPT <rfc822;realc9580@gmail.com> + 99 others); Mon, 13 Mar 2023 03:01:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229768AbjCMHBx (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 13 Mar 2023 03:01:53 -0400 Received: from hust.edu.cn (unknown [202.114.0.240]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56AED302A4; Mon, 13 Mar 2023 00:01:52 -0700 (PDT) Received: from localhost.localdomain ([172.16.0.254]) (user=dzm91@hust.edu.cn mech=LOGIN bits=0) by mx1.hust.edu.cn with ESMTP id 32D7107A005037-32D7107D005037 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 13 Mar 2023 15:01:05 +0800 From: Dongliang Mu <dzm91@hust.edu.cn> To: Kalle Valo <kvalo@kernel.org>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com> Cc: Dongliang Mu <dzm91@hust.edu.cn>, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] wifi: ray_cs: remove one redundant del_timer Date: Mon, 13 Mar 2023 14:58:22 +0800 Message-Id: <20230313065823.256731-1-dzm91@hust.edu.cn> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-FEAS-AUTH-USER: dzm91@hust.edu.cn X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS autolearn=ham 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760235837797739179?= X-GMAIL-MSGID: =?utf-8?q?1760235837797739179?= |
Series |
[1/2] wifi: ray_cs: remove one redundant del_timer
|
|
Commit Message
Dongliang Mu
March 13, 2023, 6:58 a.m. UTC
In ray_detach, it and its child function ray_release both call
del_timer(_sync) on the same timer.
Fix this by removing the del_timer_sync in the ray_detach, and revising
the del_timer to del_timer_sync.
Signed-off-by: Dongliang Mu <dzm91@hust.edu.cn>
---
drivers/net/wireless/ray_cs.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
Comments
Hi Dongliang,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on wireless-next/main]
[also build test WARNING on wireless/main linus/master v6.3-rc2 next-20230310]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Dongliang-Mu/wifi-ray_cs-add-sanity-check-on-local-sram-rmem-amem/20230313-150341
base: https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git main
patch link: https://lore.kernel.org/r/20230313065823.256731-1-dzm91%40hust.edu.cn
patch subject: [PATCH 1/2] wifi: ray_cs: remove one redundant del_timer
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20230313/202303131721.wELY9b9M-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
# https://github.com/intel-lab-lkp/linux/commit/8b405d9c164f51ae0d9a2b1e0b0460b09e71e5c9
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Dongliang-Mu/wifi-ray_cs-add-sanity-check-on-local-sram-rmem-amem/20230313-150341
git checkout 8b405d9c164f51ae0d9a2b1e0b0460b09e71e5c9
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=x86_64 olddefconfig
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/net/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303131721.wELY9b9M-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/net/wireless/ray_cs.c: In function 'ray_detach':
>> drivers/net/wireless/ray_cs.c:325:20: warning: unused variable 'local' [-Wunused-variable]
325 | ray_dev_t *local;
| ^~~~~
In file included from include/linux/string.h:254,
from include/linux/bitmap.h:11,
from include/linux/cpumask.h:12,
from arch/x86/include/asm/paravirt.h:17,
from arch/x86/include/asm/cpuid.h:62,
from arch/x86/include/asm/processor.h:19,
from arch/x86/include/asm/timex.h:5,
from include/linux/timex.h:67,
from include/linux/time32.h:13,
from include/linux/time.h:60,
from include/linux/stat.h:19,
from include/linux/module.h:13,
from drivers/net/wireless/ray_cs.c:20:
In function 'strncpy',
inlined from 'init_startup_params' at drivers/net/wireless/ray_cs.c:625:3:
include/linux/fortify-string.h:68:33: warning: '__builtin_strncpy' specified bound 32 equals destination size [-Wstringop-truncation]
68 | #define __underlying_strncpy __builtin_strncpy
| ^
include/linux/fortify-string.h:151:16: note: in expansion of macro '__underlying_strncpy'
151 | return __underlying_strncpy(p, q, size);
| ^~~~~~~~~~~~~~~~~~~~
vim +/local +325 drivers/net/wireless/ray_cs.c
141fa61f10c419 John Daiker 2009-03-10 321
fba395eee7d3f3 Dominik Brodowski 2006-03-31 322 static void ray_detach(struct pcmcia_device *link)
^1da177e4c3f41 Linus Torvalds 2005-04-16 323 {
cc3b4866bee996 Dominik Brodowski 2005-11-14 324 struct net_device *dev;
cc3b4866bee996 Dominik Brodowski 2005-11-14 @325 ray_dev_t *local;
^1da177e4c3f41 Linus Torvalds 2005-04-16 326
624dd66957e53e Dominik Brodowski 2009-10-24 327 dev_dbg(&link->dev, "ray_detach\n");
^1da177e4c3f41 Linus Torvalds 2005-04-16 328
fd238232cd0ff4 Dominik Brodowski 2006-03-05 329 this_device = NULL;
cc3b4866bee996 Dominik Brodowski 2005-11-14 330 dev = link->priv;
cc3b4866bee996 Dominik Brodowski 2005-11-14 331
^1da177e4c3f41 Linus Torvalds 2005-04-16 332 ray_release(link);
^1da177e4c3f41 Linus Torvalds 2005-04-16 333
^1da177e4c3f41 Linus Torvalds 2005-04-16 334 if (link->priv) {
141fa61f10c419 John Daiker 2009-03-10 335 unregister_netdev(dev);
^1da177e4c3f41 Linus Torvalds 2005-04-16 336 free_netdev(dev);
^1da177e4c3f41 Linus Torvalds 2005-04-16 337 }
624dd66957e53e Dominik Brodowski 2009-10-24 338 dev_dbg(&link->dev, "ray_cs ray_detach ending\n");
^1da177e4c3f41 Linus Torvalds 2005-04-16 339 } /* ray_detach */
141fa61f10c419 John Daiker 2009-03-10 340
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c index 1f57a0055bbd..785a5be72b2b 100644 --- a/drivers/net/wireless/ray_cs.c +++ b/drivers/net/wireless/ray_cs.c @@ -331,9 +331,6 @@ static void ray_detach(struct pcmcia_device *link) ray_release(link); - local = netdev_priv(dev); - del_timer_sync(&local->timer); - if (link->priv) { unregister_netdev(dev); free_netdev(dev); @@ -734,7 +731,7 @@ static void ray_release(struct pcmcia_device *link) dev_dbg(&link->dev, "ray_release\n"); - del_timer(&local->timer); + del_timer_sync(&local->timer); iounmap(local->sram); iounmap(local->rmem);