All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shaokun Zhang <zhangshaokun@hisilicon.com>
To: Will Deacon <will@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>, Qi Liu <liuqi115@huawei.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] drivers/perf: hisi: Fix DEVICE_ATTR style tests warning for later PMU driver
Date: Tue, 15 Sep 2020 10:39:28 +0800	[thread overview]
Message-ID: <36f4e162-2a6a-0dae-f7a8-212e4bfee7e0@hisilicon.com> (raw)
In-Reply-To: <20200914122952.GB24441@willie-the-truck>

Hi Will,

在 2020/9/14 20:29, Will Deacon 写道:
> On Sat, Sep 12, 2020 at 05:03:06PM +0800, Shaokun Zhang wrote:
>> Since commit 001804689b0d ("checkpatch: add a few DEVICE_ATTR style
>> tests") has checked DEVICE_ATTR style, let's cleanup the sysfs interface
>> to get rid of the warning for later HiSilicon uncore PMU drivers.
>> Otherwise the warning is throwed by checkpatch.pl for new drivers as
>> follow:
>> WARNING: Consider renaming function(s) 'hisi_cpumask_sysfs_show' to
>> 'cpumask_show'
> 
> [...]
> 
>> diff --git a/drivers/perf/hisilicon/hisi_uncore_pmu.c b/drivers/perf/hisilicon/hisi_uncore_pmu.c
>> index 97aff877a4e7..e2612a73edf6 100644
>> --- a/drivers/perf/hisilicon/hisi_uncore_pmu.c
>> +++ b/drivers/perf/hisilicon/hisi_uncore_pmu.c
>> @@ -54,14 +54,14 @@ EXPORT_SYMBOL_GPL(hisi_event_sysfs_show);
>>  /*
>>   * sysfs cpumask attributes. For uncore PMU, we only have a single CPU to show
>>   */
>> -ssize_t hisi_cpumask_sysfs_show(struct device *dev,
>> -				struct device_attribute *attr, char *buf)
>> +ssize_t cpumask_show(struct device *dev, struct device_attribute *attr,
>> +		     char *buf)
>>  {
>>  	struct hisi_pmu *hisi_pmu = to_hisi_pmu(dev_get_drvdata(dev));
>>  
>>  	return sprintf(buf, "%d\n", hisi_pmu->on_cpu);
>>  }
>> -EXPORT_SYMBOL_GPL(hisi_cpumask_sysfs_show);
>> +EXPORT_SYMBOL_GPL(cpumask_show);
> 
> This seems like a colossally bad idea to me.

Apologies. We are developing new uncore PMU module drivers which will be sent to commuinity
later and do checkpatch.pl that introduces this warning. Since the interface is not new
developed, so you suggest to keep it the same, right?

Thanks,
Shaokun

> 
> Will
> 
> .
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-09-15  2:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-12  9:03 [PATCH] drivers/perf: hisi: Fix DEVICE_ATTR style tests warning for later PMU driver Shaokun Zhang
2020-09-14 12:29 ` Will Deacon
2020-09-15  2:39   ` Shaokun Zhang [this message]
2020-09-15 10:30     ` Will Deacon
2020-09-16  1:41       ` Shaokun Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=36f4e162-2a6a-0dae-f7a8-212e4bfee7e0@hisilicon.com \
    --to=zhangshaokun@hisilicon.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=liuqi115@huawei.com \
    --cc=mark.rutland@arm.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.