On Sat, May 16, 2026 at 12:33:42AM +0200, Yousef Alhouseen wrote:
> Sysfs show() callbacks should emit a trailing newline for text output.
> Several Greybus audio manager module attributes currently omit the
> newline, which triggers checkpatch warnings and makes the attributes less
> convenient to read from userspace.
>
> Append missing newlines to the affected sysfs_emit() format strings.
>
> Signed-off-by: Yousef Alhouseen <alhouseenyousef(a)gmail.com>
> ---
> drivers/staging/greybus/audio_manager_module.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/greybus/audio_manager_module.c b/drivers/staging/greybus/audio_manager_module.c
> index dc90cc2d2308..5737f2a32f5a 100644
> --- a/drivers/staging/greybus/audio_manager_module.c
> +++ b/drivers/staging/greybus/audio_manager_module.c
> @@ -75,7 +75,7 @@ static void gb_audio_module_release(struct kobject *kobj)
> static ssize_t gb_audio_module_name_show(struct gb_audio_manager_module *module,
> struct gb_audio_manager_module_attribute *attr, char *buf)
> {
> - return sysfs_emit(buf, "%s", module->desc.name);
> + return sysfs_emit(buf, "%s\n", module->desc.name);
> }
>
> static struct gb_audio_manager_module_attribute gb_audio_module_name_attribute =
> @@ -84,7 +84,7 @@ static struct gb_audio_manager_module_attribute gb_audio_module_name_attribute =
> static ssize_t gb_audio_module_vid_show(struct gb_audio_manager_module *module,
> struct gb_audio_manager_module_attribute *attr, char *buf)
> {
> - return sysfs_emit(buf, "%d", module->desc.vid);
> + return sysfs_emit(buf, "%d\n", module->desc.vid);
> }
>
> static struct gb_audio_manager_module_attribute gb_audio_module_vid_attribute =
> @@ -93,7 +93,7 @@ static struct gb_audio_manager_module_attribute gb_audio_module_vid_attribute =
> static ssize_t gb_audio_module_pid_show(struct gb_audio_manager_module *module,
> struct gb_audio_manager_module_attribute *attr, char *buf)
> {
> - return sysfs_emit(buf, "%d", module->desc.pid);
> + return sysfs_emit(buf, "%d\n", module->desc.pid);
> }
>
> static struct gb_audio_manager_module_attribute gb_audio_module_pid_attribute =
> @@ -103,7 +103,7 @@ static ssize_t gb_audio_module_intf_id_show(struct gb_audio_manager_module *modu
> struct gb_audio_manager_module_attribute *attr,
> char *buf)
> {
> - return sysfs_emit(buf, "%d", module->desc.intf_id);
> + return sysfs_emit(buf, "%d\n", module->desc.intf_id);
> }
>
> static struct gb_audio_manager_module_attribute
> @@ -114,7 +114,7 @@ static ssize_t gb_audio_module_ip_devices_show(struct gb_audio_manager_module *m
> struct gb_audio_manager_module_attribute *attr,
> char *buf)
> {
> - return sysfs_emit(buf, "0x%X", module->desc.ip_devices);
> + return sysfs_emit(buf, "0x%X\n", module->desc.ip_devices);
> }
>
> static struct gb_audio_manager_module_attribute
> @@ -125,7 +125,7 @@ static ssize_t gb_audio_module_op_devices_show(struct gb_audio_manager_module *m
> struct gb_audio_manager_module_attribute *attr,
> char *buf)
> {
> - return sysfs_emit(buf, "0x%X", module->desc.op_devices);
> + return sysfs_emit(buf, "0x%X\n", module->desc.op_devices);
> }
>
> static struct gb_audio_manager_module_attribute
> --
> 2.54.0
>
>
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him
a patch that has triggered this response. He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created. Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.
You are receiving this message because of the following common error(s)
as indicated below:
- You sent a patch that has been sent multiple times in the past few
days, and is identical to ones that has been recently rejected.
Please always look at the mailing list traffic to determine if you are
duplicating other people's work.
If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.
thanks,
greg k-h's patch email bot
On Fri, May 15, 2026 at 10:02:26AM +0200, Nikolai Grlica wrote:
> Sysfs attribute output should be newline-terminated.
>
> Add missing newlines to the Greybus audio manager module attribute show
> functions.
>
> Signed-off-by: Nikolai Grlica <grlicanikolai(a)gmail.com>
> ---
> drivers/staging/greybus/audio_manager_module.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/greybus/audio_manager_module.c
> b/drivers/staging/greybus/audio_manager_module.c
> index dc90cc2d2308..5737f2a32f5a 100644
> --- a/drivers/staging/greybus/audio_manager_module.c
> +++ b/drivers/staging/greybus/audio_manager_module.c
> @@ -75,7 +75,7 @@ static void gb_audio_module_release(struct kobject *kobj)
> static ssize_t gb_audio_module_name_show(struct gb_audio_manager_module
> *module,
> struct gb_audio_manager_module_attribute *attr, char *buf)
> {
> - return sysfs_emit(buf, "%s", module->desc.name);
> + return sysfs_emit(buf, "%s\n", module->desc.name);
> }
>
> static struct gb_audio_manager_module_attribute
> gb_audio_module_name_attribute =
> @@ -84,7 +84,7 @@ static struct gb_audio_manager_module_attribute
> gb_audio_module_name_attribute =
> static ssize_t gb_audio_module_vid_show(struct gb_audio_manager_module
> *module,
> struct gb_audio_manager_module_attribute *attr, char *buf)
> {
> - return sysfs_emit(buf, "%d", module->desc.vid);
> + return sysfs_emit(buf, "%d\n", module->desc.vid);
> }
>
> static struct gb_audio_manager_module_attribute
> gb_audio_module_vid_attribute =
> @@ -93,7 +93,7 @@ static struct gb_audio_manager_module_attribute
> gb_audio_module_vid_attribute =
> static ssize_t gb_audio_module_pid_show(struct gb_audio_manager_module
> *module,
> struct gb_audio_manager_module_attribute *attr, char *buf)
> {
> - return sysfs_emit(buf, "%d", module->desc.pid);
> + return sysfs_emit(buf, "%d\n", module->desc.pid);
> }
>
> static struct gb_audio_manager_module_attribute
> gb_audio_module_pid_attribute =
> @@ -103,7 +103,7 @@ static ssize_t gb_audio_module_intf_id_show(struct
> gb_audio_manager_module *modu
> struct gb_audio_manager_module_attribute *attr,
> char *buf)
> {
> - return sysfs_emit(buf, "%d", module->desc.intf_id);
> + return sysfs_emit(buf, "%d\n", module->desc.intf_id);
> }
>
> static struct gb_audio_manager_module_attribute
> @@ -114,7 +114,7 @@ static ssize_t gb_audio_module_ip_devices_show(struct
> gb_audio_manager_module *m
> struct gb_audio_manager_module_attribute *attr,
> char *buf)
> {
> - return sysfs_emit(buf, "0x%X", module->desc.ip_devices);
> + return sysfs_emit(buf, "0x%X\n", module->desc.ip_devices);
> }
>
> static struct gb_audio_manager_module_attribute
> @@ -125,7 +125,7 @@ static ssize_t gb_audio_module_op_devices_show(struct
> gb_audio_manager_module *m
> struct gb_audio_manager_module_attribute *attr,
> char *buf)
> {
> - return sysfs_emit(buf, "0x%X", module->desc.op_devices);
> + return sysfs_emit(buf, "0x%X\n", module->desc.op_devices);
> }
>
> static struct gb_audio_manager_module_attribute
>
> base-commit: 81f55766523e5293604cb96c5e98d10da345ff33
> --
> 2.54.0
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him
a patch that has triggered this response. He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created. Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.
You are receiving this message because of the following common error(s)
as indicated below:
- Your patch is malformed (tabs converted to spaces, linewrapped, etc.)
and can not be applied. Please read the file,
Documentation/process/email-clients.rst in order to fix this.
- You sent a patch that has been sent multiple times in the past few
days, and is identical to ones that has been recently rejected.
Please always look at the mailing list traffic to determine if you are
duplicating other people's work.
If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.
thanks,
greg k-h's patch email bot
On Sun, May 10, 2026 at 08:41:43PM +0200, Alexander A. Klimov wrote:
> manager_sysfs_add_store() passes 6 pointers to sscanf(),
> but required latter to return 7 which always failed the operation.
> I corrected it to 6.
>
> Signed-off-by: Alexander A. Klimov <grandmaster(a)al2klimov.de>
> ---
This needs a Fixes tag.
Fixes: 49b9137a6002 ("staging: greybus: audio: remove redundant slot field")
You need to add Pankaj Bharadiya <pankaj.bharadiya(a)gmail.com> to the
CC list. Although that patch is from 10 years ago so it means no one is
using this.
regards,
dan carpenter
Commit 0a3fe972a7cb ("HID: core: Mitigate potential OOB by removing
bogus memset()") enforced the provided data to be at least the size of
the declared buffer in the report descriptor to prevent a buffer
overflow.
We only had corner cases of malicious devices exposing the OOM because
in most cases, the buffer provided by the transport layer needs to be
allocated at probe time and is large enough to handle all the possible
reports.
However, the patch from above, which enforces the spec a little bit more
introduced both regressions for devices not following the spec (not
necesserally malicious), but also a stream of errors for those devices.
Let's revert to the old behavior by giving more information to HID core
to be able to decide whether it can or not memset the rest of the buffer
to 0 and continue the processing.
Note that the first commit makes an API change, but the callers are
relatively limited, so it should be fine on its own. The second patch
can't really make the same kind of API change because we have too many
callers in various subsystems. We can switch them one by one to the safe
approach when needed.
The last 2 patches are small cleanups I initially put together with the
2 first patches, but they can be applied on their own and don't need to
be pulled in stable like the first 2.
Cheers,
Benjamin
Signed-off-by: Benjamin Tissoires <bentiss(a)kernel.org>
---
Changes in v3:
- fixed ghib -> ghid in greybus
- fixed i386 size_t debug size reported by kernel-bot
- Link to v2: https://lore.kernel.org/r/20260416-wip-fix-core-v2-0-be92570e5627@kernel.org
Changes in v2:
- added a small blurb explaining the difference between the safe and the
non safe version of hid_safe_input_report
- Link to v1: https://lore.kernel.org/r/20260415-wip-fix-core-v1-0-ed3c4c823175@kernel.org
---
Benjamin Tissoires (4):
HID: pass the buffer size to hid_report_raw_event
HID: core: introduce hid_safe_input_report()
HID: multitouch: use __free(kfree) to clean up temporary buffers
HID: wacom: use __free(kfree) to clean up temporary buffers
drivers/hid/bpf/hid_bpf_dispatch.c | 6 ++--
drivers/hid/hid-core.c | 67 ++++++++++++++++++++++++++++++--------
drivers/hid/hid-gfrm.c | 4 +--
drivers/hid/hid-logitech-hidpp.c | 2 +-
drivers/hid/hid-multitouch.c | 18 ++++------
drivers/hid/hid-primax.c | 2 +-
drivers/hid/hid-vivaldi-common.c | 2 +-
drivers/hid/i2c-hid/i2c-hid-core.c | 7 ++--
drivers/hid/usbhid/hid-core.c | 11 ++++---
drivers/hid/wacom_sys.c | 46 +++++++++-----------------
drivers/staging/greybus/hid.c | 2 +-
include/linux/hid.h | 6 ++--
include/linux/hid_bpf.h | 14 +++++---
13 files changed, 109 insertions(+), 78 deletions(-)
---
base-commit: 7df6572f1cb381d6b89ceed58e3b076c233c2cd0
change-id: 20260415-wip-fix-core-7d85c8516ed0
Best regards,
--
Benjamin Tissoires <bentiss(a)kernel.org>
The original dev_info call was intentionally temporary, with a FIXME
comment noting it should be downgraded to dev_dbg once modules with
valid VID/PID values were common. Project Ara was cancelled in 2016,
so that time has long passed.
Remove the FIXME comment and downgrade to dev_dbg as originally intended.
Tested via code inspection only, as Project Ara hardware is no longer
available.
Signed-off-by: Bentley Blacketer <sonionwhat(a)gmail.com>
Signed-off-by: Bentley Blacketer <sonionwhat(a)gmail.com>
---
drivers/staging/greybus/bootrom.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/greybus/bootrom.c b/drivers/staging/greybus/bootrom.c
index 83921d90c..058044ba7 100644
--- a/drivers/staging/greybus/bootrom.c
+++ b/drivers/staging/greybus/bootrom.c
@@ -163,18 +163,13 @@ static int find_firmware(struct gb_bootrom *bootrom, u8 stage)
*
* XXX Name it properly..
*/
- snprintf(firmware_name, sizeof(firmware_name),
+snprintf(firmware_name, sizeof(firmware_name),
FW_NAME_PREFIX "%08x_%08x_%08x_%08x_s2l.tftf",
intf->ddbl1_manufacturer_id, intf->ddbl1_product_id,
intf->vendor_id, intf->product_id);
- // FIXME:
- // Turn to dev_dbg later after everyone has valid bootloaders with good
- // ids, but leave this as dev_info for now to make it easier to track
- // down "empty" vid/pid modules.
- dev_info(&connection->bundle->dev, "Firmware file '%s' requested\n",
+ dev_dbg(&connection->bundle->dev, "Firmware file '%s' requested\n",
firmware_name);
-
rc = request_firmware(&bootrom->fw, firmware_name,
&connection->bundle->dev);
if (rc) {
--
2.54.0
gb_tty_set_termios() derives UART line configuration from a subset of
termios->c_cflag bits, namely CSIZE, CSTOPB, PARENB, PARODD, CMSPAR,
CRTSCTS, CLOCAL and CBAUD. Other c_cflag bits are not interpreted by
the driver and are not represented in the Greybus UART protocol
messages.
The existing FIXME suggests clearing unsupported bits from termios.
However, the driver already limits its behavior to the supported subset
when constructing line coding, and unused bits are effectively ignored.
No invalid or unsupported values are propagated to the hardware.
Replace the FIXME with a comment documenting which c_cflag bits are
consumed by the driver and clarifying that other bits are ignored.
No functional change intended.
Signed-off-by: Debjeet Banerjee <debjeetbanerjee48(a)gmail.com>
---
drivers/staging/greybus/uart.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/greybus/uart.c
index 7d060b4cd33d..49d685a6ad8c 100644
--- a/drivers/staging/greybus/uart.c
+++ b/drivers/staging/greybus/uart.c
@@ -494,8 +494,20 @@ static void gb_tty_set_termios(struct tty_struct *tty,
(termios->c_cflag & CMSPAR ? 2 : 0) : 0;
newline.data_bits = tty_get_char_size(termios->c_cflag);
-
- /* FIXME: needs to clear unsupported bits in the termios */
+ /*
+ * The Greybus UART driver only interprets a subset of termios
+ * c_cflag bits when configuring line settings:
+ *
+ * - CSIZE via tty_get_char_size() for data bits
+ * - CSTOPB for stop-bit format
+ * - PARENB, PARODD, CMSPAR for parity encoding
+ * - CRTSCTS for hardware flow control
+ * - CLOCAL for modem control handling
+ * - CBAUD via C_BAUD() for baud rate and B0 semantics
+ *
+ * Other c_cflag bits are ignored as they are not represented in
+ * the Greybus UART protocol.
+ */
gb_tty->clocal = ((termios->c_cflag & CLOCAL) != 0);
if (C_BAUD(tty) == B0) {
--
2.53.0