Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3205016pxb; Sun, 7 Feb 2021 01:11:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJyJVBngUmBdVgKD8hp2/kFUo/fWAsh2nIcx4Yk0pb8ho9XR5sdYGYfIxf9P/KptlpilQKEx X-Received: by 2002:aa7:d6d4:: with SMTP id x20mr12147774edr.8.1612689094466; Sun, 07 Feb 2021 01:11:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612689094; cv=none; d=google.com; s=arc-20160816; b=fS/bnYJ2l/zzH2WyR2yzEUXFnz1SkoKS8guOnKPwEpV9fG8YMsTUveN+JQPfW8flkm 1JGvnRs04ReyhJP5hmSz/MWxqiPKVb7ppOhyXFa1DqDGh5n/GnUkZfF8pRGqGrS2vc7y B0ezTBFskR7c0A2eCpn4FIQOjyAeKeGpMZIYk2Qacm85PtuxsXxJkd45qlmSMrWqmvxf DvOd0JnwWBZ2evSuvnfODKIy6aEnmUeU5KsZjcdXbbBJkcVaYvHuVyFrw1kJfVad4Cuk XQovuwCoV3rjzHTwXB99jcmhA4Uj+grN3g7dqSzu79m8NCd1yAEyfgLeFvAdkHygTc66 VHSg== 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 :dkim-signature; bh=8HDOBrsAzuKElcA7qlZ9yTgLVVQVK/JHfy+n859Oh30=; b=KODsLVsD/IYIYWD1zuwxvnfIXUTOxoDXlVwnJSbm1+td8PHE7CpxjcsGCIdFz+4axH QJu4QM4EZh3fkQ3onRH5jU0PU2YzjkoU3TxTUyETWIASdWhb3enmGzFwfp6e6XY2+J/9 3c9gXF0K33pk5hcOEaSzb/EFRYzdUAxoS5AFgBQg4G8T+iztGMxhq6RTLDS6X1qLAR7n pw2wuxm3LQEvuq4e88N5p8krJEGI1psYinxCAg2TkQgKyDrSsN57C2Vy8RjyUV4zKAin 2/arl70G1TgniGwYjDAePlaIV4A/te+jNUwjDCk7PazHge0SdMHiR3lUwyfKBZv0W+My 0yKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hTDqu+og; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 22si7996500ejc.181.2021.02.07.01.11.09; Sun, 07 Feb 2021 01:11:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hTDqu+og; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229646AbhBGJKG (ORCPT + 99 others); Sun, 7 Feb 2021 04:10:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229510AbhBGJJz (ORCPT ); Sun, 7 Feb 2021 04:09:55 -0500 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F45BC06174A for ; Sun, 7 Feb 2021 01:09:15 -0800 (PST) Received: by mail-pf1-x443.google.com with SMTP id q131so7739070pfq.10 for ; Sun, 07 Feb 2021 01:09:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8HDOBrsAzuKElcA7qlZ9yTgLVVQVK/JHfy+n859Oh30=; b=hTDqu+ogfbyEUrJBefH1NDZLWV/9R7Xns8v8K80ALJPTjTJyIrIi7JqY29rJ455pKI bplqftu8wsySlImyowff8faJjpcvGo9sjI/LWfBbd0O5OTp901md0n0uqD6FldDrSd4z m/h6q0kMKr/oWHJruQWB+HJ6WhUy1YTmbXDx4j16iTSeFTy+5JnP14ifsJhnnUr5Z/a6 nbyHAiSvfAQrf6amn2nJoE/wKDb+ebEAnt/goAkmEbNUjqlvfML9ifNEVvkZd7HZcr+H oWBX5ewbjt7+P55E9u82rlm8eDf/j52Pw50R6NPMNpYEb7+6ewSC7LzUC6VJwYAu+sDr hicw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8HDOBrsAzuKElcA7qlZ9yTgLVVQVK/JHfy+n859Oh30=; b=tbVV7zXw5/3h+t9gWZ2P+pVlA9p4QileyGjdLWIjlk3zjMyoqWpj/PGzEJki79H4IB bVjwIsFlzreOrPtfRnMa16JPDE63Rb34+MYQKkoChem21ivt2GUGv20A6c/nglPXCevN /MvMTKEJ09ZFlnbj7DKT1W5RLZYX263G9mMZJpTsetbVjsTlZ//erZvS0gM3pZ+1qHMk tUwYoD+tzbYCCzVyEQcOqnrefv6/xZQm9J9zdaX2cAL8yIo28MivPJeEX3+sdbQeb7wp e1pk3JEssijyqCckYw8/Bo/phMLRsRZe3cmsrsM6J7dQumPBJy42P4go0/W1tpwNx9OL HQNQ== X-Gm-Message-State: AOAM532PV6IuiDf92hNna6AQaYvY0CNbntpxPHLlGzNrxtAl5QqJIsH5 uYJqm2jhYWBv1ElsXvGIwnzRbmXJ3cI= X-Received: by 2002:a65:50c8:: with SMTP id s8mr12375480pgp.68.1612688953916; Sun, 07 Feb 2021 01:09:13 -0800 (PST) Received: from localhost ([2402:3a80:11d2:b946:a2a4:c5ff:fe20:7222]) by smtp.gmail.com with ESMTPSA id h11sm12883843pfr.201.2021.02.07.01.09.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Feb 2021 01:09:13 -0800 (PST) From: Kumar Kartikeya Dwivedi To: devel@driverdev.osuosl.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Cc: Kumar Kartikeya Dwivedi , Stephen Rothwell Subject: [PATCH v3] staging: emxx_udc: Make incorrectly defined global static Date: Sun, 7 Feb 2021 14:29:12 +0530 Message-Id: <20210207085911.270746-1-memxor@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The global gpio_desc pointer and int vbus_irq were defined in the header, instead put the definitions in the translation unit and make them static as there's only a single consumer, and these symbols shouldn't pollute the global namespace. This fixes the following sparse warnings for this driver: drivers/staging/emxx_udc/emxx_udc.c: note: in included file: drivers/staging/emxx_udc/emxx_udc.h:23:18: warning: symbol 'vbus_gpio' was not declared. Should it be static? drivers/staging/emxx_udc/emxx_udc.h:24:5: warning: symbol 'vbus_irq' was not declared. Should it be static? Signed-off-by: Kumar Kartikeya Dwivedi --- Changes in v1: Switch to variable with static linkage instead of extern Changes in v2: Resend a versioned patch Changes in v3: Include version changelog below the marker --- drivers/staging/emxx_udc/emxx_udc.c | 3 +++ drivers/staging/emxx_udc/emxx_udc.h | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c index a30b4f5b1..3536c03ff 100644 --- a/drivers/staging/emxx_udc/emxx_udc.c +++ b/drivers/staging/emxx_udc/emxx_udc.c @@ -34,6 +34,9 @@ #define DRIVER_DESC "EMXX UDC driver" #define DMA_ADDR_INVALID (~(dma_addr_t)0) +static struct gpio_desc *vbus_gpio; +static int vbus_irq; + static const char driver_name[] = "emxx_udc"; static const char driver_desc[] = DRIVER_DESC; diff --git a/drivers/staging/emxx_udc/emxx_udc.h b/drivers/staging/emxx_udc/emxx_udc.h index bca614d69..c9e37a1b8 100644 --- a/drivers/staging/emxx_udc/emxx_udc.h +++ b/drivers/staging/emxx_udc/emxx_udc.h @@ -20,8 +20,6 @@ /* below hacked up for staging integration */ #define GPIO_VBUS 0 /* GPIO_P153 on KZM9D */ #define INT_VBUS 0 /* IRQ for GPIO_P153 */ -struct gpio_desc *vbus_gpio; -int vbus_irq; /*------------ Board dependence(Wait) */ -- 2.29.2