linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vadym Tytan <titanv3585@gmail.com>
To: 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: Tue, 13 May 2025 10:44:43 +0200	[thread overview]
Message-ID: <f5594328-11e4-4310-b961-41d8ca0c8116@gmail.com> (raw)
In-Reply-To: <202505100535.vKH3zHW6-lkp@intel.com>

> 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 },
>    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-05-13  8:44 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 [this message]
2025-06-30  3:41       ` Terry Junge
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=f5594328-11e4-4310-b961-41d8ca0c8116@gmail.com \
    --to=titanv3585@gmail.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 \
    /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).