Message ID | 20230317191341.1670660-1-trix@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp529796wrt; Fri, 17 Mar 2023 12:51:14 -0700 (PDT) X-Google-Smtp-Source: AK7set+pW2d17a+4OkDJggzPw3G99nP81ovct+Y47Y1T+5PTb2cudjGjTCIqhbI8YsF99z/Cwo+G X-Received: by 2002:a05:6a21:32a1:b0:c7:af88:4199 with SMTP id yt33-20020a056a2132a100b000c7af884199mr10474677pzb.6.1679082674486; Fri, 17 Mar 2023 12:51:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679082674; cv=none; d=google.com; s=arc-20160816; b=lEewBQm3Wo+n86P+/4ne6wFEngjIGQy4gA2CdNYZ2Ub4jfIV6WChZoUT/UMVuv55Y7 YZuMnxFC1UhqU5rdzCH111alPQsBPC2YjySwoBHfsrLQUIegJ5ZNPSMElgU0PzjUfQMP r5UyiIVUL9YrNxnsr036t8/8E9OPonXivmEBRiCla+6aAk/UzeIVhAmrI6yTsQgjerjw j8DI/gqEjxvp8fps1Codz04flhdK2VC5lQxD3H9aeOG7j5/wTngqhMFUAHZO1SEc5NaG j9lqqHj0vduJhT8GVCQ/+TFCmOgCeR/eChNfh3fGFNptfYV9NVQfhAUe3367Yk9gnY4N pNyw== 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:dkim-signature; bh=ztGk+FDLapVOGmVmFaxYJiKEGt8g1pDCbQl/HqGei0o=; b=TQKNHIBXYIYeCCUxZ2v8w+nKa4c5a5I+5x5EdWP0lh1MmvRA3JOPuqg6SocbbiE7HY Vo2WK3/ci/viGEMH6mfQAEKmWM6VVjmyF8q8fzYOkibf+fELYCp3bgavhwkCCOAVE3Fx 2nPT1gGDOUEGx2ue/3bOs7hDUNKvkm7V4Gh0PsGwap8NquSVAR1ZaqmZCqMINGDpKNH9 ZBJO8R6YvQPUjcXJ8lJfIEMhgzoA0SQO/RMw2VYlbdbAXsyNKsg0bDwq2EKarUjoeZcM SucNKOg/X7JETAEcbT8ppBBnEw+3NqOc4wDycC1pYKJ5xOq8p/JDPY2D/5nW4unUVvq0 H4gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GKrYeD4T; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z3-20020aa79f83000000b005a8a56ac57esi3068873pfr.246.2023.03.17.12.50.53; Fri, 17 Mar 2023 12:51:14 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GKrYeD4T; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229765AbjCQTPD (ORCPT <rfc822;chrisfriedt@gmail.com> + 99 others); Fri, 17 Mar 2023 15:15:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229780AbjCQTPC (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 17 Mar 2023 15:15:02 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F08EDCF54 for <linux-kernel@vger.kernel.org>; Fri, 17 Mar 2023 12:13:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1679080427; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=ztGk+FDLapVOGmVmFaxYJiKEGt8g1pDCbQl/HqGei0o=; b=GKrYeD4TSeVGfLLHQ+BFagnKB9bQ731Aj+V3sJZnrrCeHg6Sr/nb+FyB2TdW1g0fUm6bNV j2ef5X3kJakljc8I99ShGUF58YRO9tjxgBnTu33veyD7mQvQbzy2GIYBwP1/HjYK7smWv5 3FU6+lx11yJ6J2irYprV6kiPMlTeeWA= Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-643-ADoCsd02M4GpbiJ3wp3jrw-1; Fri, 17 Mar 2023 15:13:46 -0400 X-MC-Unique: ADoCsd02M4GpbiJ3wp3jrw-1 Received: by mail-qt1-f198.google.com with SMTP id l2-20020ac87242000000b003bfecc6d046so3019119qtp.17 for <linux-kernel@vger.kernel.org>; Fri, 17 Mar 2023 12:13:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679080425; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ztGk+FDLapVOGmVmFaxYJiKEGt8g1pDCbQl/HqGei0o=; b=gTJGX95HXY+JCgXTDpp11AdNdsABcD9QXy4aJIcjk3T0ItF6TvdDwlcTmhd7kh7IJu NByP+0ZAWwNWri4F1QNSQRmtPhsEcroFHzlt84Jm6C9JshdFEvSZkcX5LVE5csJdccz/ xJKYeobnIWK1mkhWbYarJy8yULfBFn3GRE2uFT+eimz0HxPN6/n5l8g7dc6UHuc1z2K9 7OsB624204r550gWiLhmjjG+GAcGP9gwlJcj5RLhqrHjfBqTdWuKpmEK2ySixyBRQ92o G76YehmOwrTKKfuV8w04lzc4CCN6QdV+MH244iwj2vzm2Y/6m/df9TqAc3qlvx9wNQYr cjTQ== X-Gm-Message-State: AO0yUKVirDY8lcCJtXl8jDeCTYLSbu5K3c95vb/Hj+N2oB+q1ybogina eUeqrnSqu2lChDRjrRofjpli8AKlD/fjfTca97x/fnVqB5XnNNc14MEaidf31ERRxLTzTYwOeIM Fv6Te9bXwgb3jhUMRSf860gbYqfD/K91u X-Received: by 2002:ac8:7d0c:0:b0:3d7:b045:d39 with SMTP id g12-20020ac87d0c000000b003d7b0450d39mr12113669qtb.62.1679080425620; Fri, 17 Mar 2023 12:13:45 -0700 (PDT) X-Received: by 2002:ac8:7d0c:0:b0:3d7:b045:d39 with SMTP id g12-20020ac87d0c000000b003d7b0450d39mr12113637qtb.62.1679080425373; Fri, 17 Mar 2023 12:13:45 -0700 (PDT) Received: from dell-per740-01.7a2m.lab.eng.bos.redhat.com (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id m17-20020ac84451000000b003c03b33e6f5sm1698622qtn.90.2023.03.17.12.13.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Mar 2023 12:13:45 -0700 (PDT) From: Tom Rix <trix@redhat.com> To: pavel@ucw.cz, lee@kernel.org, quic_fenglinw@quicinc.com Cc: linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, Tom Rix <trix@redhat.com> Subject: [PATCH] leds: flash: set varaiables mvflash_3,4ch_regs storage-class-specifier to static Date: Fri, 17 Mar 2023 15:13:41 -0400 Message-Id: <20230317191341.1670660-1-trix@redhat.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760645794434619627?= X-GMAIL-MSGID: =?utf-8?q?1760645794434619627?= |
Series |
leds: flash: set varaiables mvflash_3,4ch_regs storage-class-specifier to static
|
|
Commit Message
Tom Rix
March 17, 2023, 7:13 p.m. UTC
smatch reports
drivers/leds/flash/leds-qcom-flash.c:103:18: warning:
symbol 'mvflash_3ch_regs' was not declared. Should it be static?
drivers/leds/flash/leds-qcom-flash.c:115:18: warning:
symbol 'mvflash_4ch_regs' was not declared. Should it be static?
These variables are only used in leds-qcom-flash.c,
so it should be static.
Signed-off-by: Tom Rix <trix@redhat.com>
---
drivers/leds/flash/leds-qcom-flash.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
On Fri 2023-03-17 15:13:41, Tom Rix wrote: > smatch reports > drivers/leds/flash/leds-qcom-flash.c:103:18: warning: > symbol 'mvflash_3ch_regs' was not declared. Should it be static? > drivers/leds/flash/leds-qcom-flash.c:115:18: warning: > symbol 'mvflash_4ch_regs' was not declared. Should it be static? > > These variables are only used in leds-qcom-flash.c, > so it should be static. > > Signed-off-by: Tom Rix <trix@redhat.com> Acked-by: Pavel Machek <pavel@ucw.cz> BR, Pavel
On Fri, 17 Mar 2023, Tom Rix wrote: > smatch reports > drivers/leds/flash/leds-qcom-flash.c:103:18: warning: > symbol 'mvflash_3ch_regs' was not declared. Should it be static? > drivers/leds/flash/leds-qcom-flash.c:115:18: warning: > symbol 'mvflash_4ch_regs' was not declared. Should it be static? > > These variables are only used in leds-qcom-flash.c, > so it should be static. > > Signed-off-by: Tom Rix <trix@redhat.com> > --- > drivers/leds/flash/leds-qcom-flash.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) I fixed-up some spelling / formatting issues and ... Applied, thanks -- Lee Jones [李琼斯]
diff --git a/drivers/leds/flash/leds-qcom-flash.c b/drivers/leds/flash/leds-qcom-flash.c index 406ed8761c78..90a24fa25a49 100644 --- a/drivers/leds/flash/leds-qcom-flash.c +++ b/drivers/leds/flash/leds-qcom-flash.c @@ -100,7 +100,7 @@ enum { REG_MAX_COUNT, }; -struct reg_field mvflash_3ch_regs[REG_MAX_COUNT] = { +static struct reg_field mvflash_3ch_regs[REG_MAX_COUNT] = { REG_FIELD(0x08, 0, 7), /* status1 */ REG_FIELD(0x09, 0, 7), /* status2 */ REG_FIELD(0x0a, 0, 7), /* status3 */ @@ -112,7 +112,7 @@ struct reg_field mvflash_3ch_regs[REG_MAX_COUNT] = { REG_FIELD(0x4c, 0, 2), /* chan_en */ }; -struct reg_field mvflash_4ch_regs[REG_MAX_COUNT] = { +static struct reg_field mvflash_4ch_regs[REG_MAX_COUNT] = { REG_FIELD(0x06, 0, 7), /* status1 */ REG_FIELD(0x07, 0, 6), /* status2 */ REG_FIELD(0x09, 0, 7), /* status3 */