From patchwork Thu Mar 1 15:27:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 130287 Delivered-To: patch@linaro.org Received: by 10.80.172.228 with SMTP id x91csp2952555edc; Thu, 1 Mar 2018 07:38:40 -0800 (PST) X-Google-Smtp-Source: AG47ELuoW7zpKq/GYV+4JUBXTyVBeteufbSbvURAsKYOPa6zzNyhBM68ixoEtigyco2Xn5d6b6pi X-Received: by 2002:a17:902:12e:: with SMTP id 43-v6mr2294850plb.77.1519918719889; Thu, 01 Mar 2018 07:38:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519918719; cv=none; d=google.com; s=arc-20160816; b=WkSH3R0r4IdAFHJNsbze8VUmOfROErXQhK0NgvmX8NTknuS4LGzyk3keIcvoBIuHHT BDfLY6RwVLp5/ZzCCnDAcfrJ0D8dbpamYatDRxgUWzJkThVJKNX8qsYK+IIcXzBqY9+E jF5l8SuJCGHzXnmgYFhkxKooo7Yr2HfJuPVoKGGC5f0/E2ZKYA3o0YdMEOfaM9GKV/c6 HowqoqPG1VlEn8qF6N0p0aFK/tYgkj8JLK1Dj+GE9TNHxnvwhHBgSY7rV9mD9LXBpOKc EUFT6rEpAVAtE4mSA8Kk+ZklQBcJUz7DCx14op4mE8g4RLpH0knya6iNwM1DswY6A1ft B/0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=duI3/ISzhzBmbBA3EUQTshWtmstL5qez1ErfxCUUr7A=; b=TpOQmpwFKY1gi4hUUGoNcL9nXMqbojG/J09RUmFyCqH1HxtfOQPnAZ0Ec5bP7G2eAD 1q9JSpSTKhTX+zpbBjdYbLv222DdzRcQOOJp5lPUQ0nTCJJ9HdaGGEWyE1IM4FptBP7X QbPDSaBRYrartXMnbgmafqSIObiEt+KRjG733f0BoZ4aFk0kp+cpl/RGQHecnnTdUuaB n50MCrcwqcCOuDDIKCFt7Ps2aQWWmYgUigqp2PztjKTod3NONTPygLUojgIpIR0O1Ctw urRTz2EFfwhGfFJ+HFQ03ZyT1W9ym1xp9yR0aTBqU1Ev2FXqfCMeVvD79qh8g391/69Y vsEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=HUr1wbMZ; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b15si2586092pgs.318.2018.03.01.07.38.39; Thu, 01 Mar 2018 07:38:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=HUr1wbMZ; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1032553AbeCAPih (ORCPT + 10 others); Thu, 1 Mar 2018 10:38:37 -0500 Received: from mail-sn1nam02on0103.outbound.protection.outlook.com ([104.47.36.103]:11220 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1032562AbeCAPid (ORCPT ); Thu, 1 Mar 2018 10:38:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=duI3/ISzhzBmbBA3EUQTshWtmstL5qez1ErfxCUUr7A=; b=HUr1wbMZUggSYSl0EKS65s/FwaL+u334tNSHruwall8ko8rz2Ib+vuOMSlmxHXq01Wgu6ROfyu32bpdsmH410ZpvaZmVDytm4ObXqq0Grd0N+KPoRy96vJ/0P5tt/cCLzokrjRUsKXJESU/44bOkddXfizDqgxUkpbHDna+Uqyk= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1016.namprd21.prod.outlook.com (52.132.133.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.567.2; Thu, 1 Mar 2018 15:38:27 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446%2]) with mapi id 15.20.0567.006; Thu, 1 Mar 2018 15:38:27 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "stable-commits@vger.kernel.org" CC: Arnd Bergmann , Greg Kroah-Hartman , Sasha Levin Subject: [added to the 4.1 stable tree] driver-core: use 'dev' argument in dev_dbg_ratelimited stub Thread-Topic: [added to the 4.1 stable tree] driver-core: use 'dev' argument in dev_dbg_ratelimited stub Thread-Index: AQHTsXHMAWwYsN4Fe02SpjTOhk6IgA== Date: Thu, 1 Mar 2018 15:27:25 +0000 Message-ID: <20180301152116.1486-461-alexander.levin@microsoft.com> References: <20180301152116.1486-1-alexander.levin@microsoft.com> In-Reply-To: <20180301152116.1486-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DM5PR2101MB1016; 7:h1wWCbnJPvNDqO57kED9KUiWZ4hVQd4pfdNM4+NCfLwCbvPWWg5zFiQOn3yTSUpevlS5JiEN8lEJaHwHuBsr+zsCw/VXRHqU4Y1gxNaqkSJT/5DI+gboF5qERnAkcnNhnJA4SIpFXQrGM752OH1h2T8FoMIznH+4+P3uTHBIAMnrPNFYQBVL62Ww7valOkFXCRQ+GjrgOmc6dhfOUHFfZrB1mCz6hO5oJOz5Pi7pYAXe8/yuJrFosVRAhe1Wots5 x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 336ccc78-a9b7-4f72-d3c0-08d57f8a7a72 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(3008032)(2017052603307)(7193020); SRVR:DM5PR2101MB1016; x-ms-traffictypediagnostic: DM5PR2101MB1016: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(85827821059158); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(61425038)(6040501)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(10201501046)(3231220)(944501229)(52105095)(6055026)(61426038)(61427038)(6041288)(20161123560045)(20161123558120)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:DM5PR2101MB1016; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB1016; x-forefront-prvs: 05986C03E0 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(366004)(39860400002)(39380400002)(376002)(396003)(189003)(199004)(22452003)(6436002)(8676002)(81156014)(81166006)(53936002)(68736007)(6486002)(6512007)(97736004)(5660300001)(86362001)(59450400001)(6506007)(102836004)(6346003)(2906002)(26005)(186003)(4326008)(10290500003)(8936002)(76176011)(478600001)(105586002)(3280700002)(14454004)(54906003)(110136005)(3660700001)(2950100002)(305945005)(7736002)(6116002)(72206003)(1076002)(3846002)(316002)(2900100001)(25786009)(36756003)(2501003)(66066001)(107886003)(106356001)(5250100002)(86612001)(99286004)(10090500001)(22906009); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB1016; H:DM5PR2101MB1032.namprd21.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: 0V0F0z9dvEKkw/JacybztTq2O9CHXXn7tSzvekJUdL0O8OcsJKjNYDK436QT0lKpmvSFwpgU+/nYrgjU4TIWFH9uDTcYNYoUSkB6oHcMEbbapnQZLOilKEZ2wNce7DJgtMq3psj03a7bR02LgPgTJ9D5OZHSZUGmda6I9IbTprE= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 336ccc78-a9b7-4f72-d3c0-08d57f8a7a72 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Mar 2018 15:27:25.1456 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1016 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann This patch has been added to the 4.1 stable tree. If you have any objections, please let us know. -- 2.14.1 =============== [ Upstream commit 1f62ff34a90471d1b735bac2c79e894afc7c59bc ] dev_dbg_ratelimited() is a macro that ignores its first argument when DEBUG is not set, which can lead to unused variable warnings: ethernet/mellanox/mlxsw/pci.c: In function 'mlxsw_pci_cqe_sdq_handle': ethernet/mellanox/mlxsw/pci.c:646:18: warning: unused variable 'pdev' [-Wunused-variable] ethernet/mellanox/mlxsw/pci.c: In function 'mlxsw_pci_cqe_rdq_handle': ethernet/mellanox/mlxsw/pci.c:671:18: warning: unused variable 'pdev' [-Wunused-variable] The macro already ensures that all its other arguments are silently ignored by the compiler without triggering a warning, through the use of the no_printk() macro, but the dev argument is not passed into that. This changes the definition to use the same trick as no_printk() with an if(0) that leads the compiler to not evaluate the side-effects but still see that 'dev' might not be unused. Signed-off-by: Arnd Bergmann Suggested-by: Andrew Lunn Fixes: 6f586e663e3b ("driver-core: Shut up dev_dbg_reatelimited() without DEBUG") Reviewed-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- include/linux/device.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/linux/device.h b/include/linux/device.h index 98a1d9748eec..84a1c7e49c51 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -1208,8 +1208,11 @@ do { \ dev_printk(KERN_DEBUG, dev, fmt, ##__VA_ARGS__); \ } while (0) #else -#define dev_dbg_ratelimited(dev, fmt, ...) \ - no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) +#define dev_dbg_ratelimited(dev, fmt, ...) \ +do { \ + if (0) \ + dev_printk(KERN_DEBUG, dev, fmt, ##__VA_ARGS__); \ +} while (0) #endif #ifdef VERBOSE_DEBUG