linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Terry Junge <linuxhid@cosmicgizmosystems.com>
To: Vadym Tytan <titanv3585@gmail.com>,
	kernel test robot <lkp@intel.com>,
	Roderick Colenbrander <roderick.colenbrander@sony.com>,
	Jiri Kosina <jikos@kernel.org>,
	Benjamin Tissoires <bentiss@kernel.org>,
	linux-kernel@vger.kernel.org, linux-input@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH] HID: playstation: DS4: Add BT poll interval adjustment
Date: Sun, 29 Jun 2025 20:41:04 -0700	[thread overview]
Message-ID: <cce2d94e-8798-489f-8c9f-68f021bb21a7@cosmicgizmosystems.com> (raw)
In-Reply-To: <f5594328-11e4-4310-b961-41d8ca0c8116@gmail.com>



On 5/13/25 1:44 AM, Vadym Tytan wrote:
>> kernel test robot noticed the following build warnings:
>>
>> sparse warnings: (new ones prefixed by >>)
>>>> drivers/hid/hid-playstation.c:1773:25: sparse: sparse: symbol 'dev_attr_dualshock4_bt_poll_interval' was not declared. Should it be static?
>>
>> vim +/dev_attr_dualshock4_bt_poll_interval +1773 drivers/hid/hid-playstation.c
>>
>>    1772   
>>> 1773    struct device_attribute dev_attr_dualshock4_bt_poll_interval = {
>>    1774        .attr    = { .name = "bt_poll_interval", .mode = 0644 },

Should it be      .attr    = { .name = "dualshock4_bt_poll_interval", .mode = 0644 },  ?

Or did you not expand the macro fully on purpose?

Thanks,
Terry

>>    1775        .show    = dualshock4_show_poll_interval,
>>    1776        .store    = dualshock4_store_poll_interval,
>>    1777    };
>>    1778   
> 
> This piece of code is expanded `DEVICE_ATTR` macro with changed variable name.
> `DEVICE_ATTR` is defined as:
> ```c
> // Reference: https://github.com/intel-lab-lkp/linux/blob/Vadym-Tytan/HID-playstation-DS4-Add-BT-poll-interval-adjustment/20250509-054413/include/linux/device.h#L138-L158
> #define DEVICE_ATTR(_name, _mode, _show, _store) \
>     struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store)
> ```
> It doesn't use `static` so neither did I.
> 
> P.S. Macro was expanded and variable name was changed from `dev_attr_bt_poll_interval` to `dev_attr_dualshock4_bt_poll_interval` because this attribute only applies to DualShock4
> 
> 


  reply	other threads:[~2025-06-30  3:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250508210148.799578-1-titanv3585@gmail.com>
2025-05-08 21:41 ` [PATCH] HID: playstation: DS4: Add BT poll interval adjustment Vadym Tytan
2025-05-09 22:06   ` kernel test robot
2025-05-13  8:44     ` Vadym Tytan
2025-06-30  3:41       ` Terry Junge [this message]
2025-06-30 14:59         ` Vadym Tytan
2025-06-08 18:08   ` Roderick Colenbrander
2025-06-09 12:25     ` Vadym Tytan

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=cce2d94e-8798-489f-8c9f-68f021bb21a7@cosmicgizmosystems.com \
    --to=linuxhid@cosmicgizmosystems.com \
    --cc=bentiss@kernel.org \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=roderick.colenbrander@sony.com \
    --cc=titanv3585@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).