drivers/staging/iio/frequency/ad9834.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
This series converts sprintf() to sysfs_emit() in staging IIO drivers (ad7816, ad9834, ad5933) to follow kernel sysfs API best practices. All changes are non-functional.From bd00f68b4797f1d9786f4e3d77e2a1e1d6fa85e7 Mon Sep 17 00:00:00 2001
From: yugmerabtene <yug.merabtene@gmail.com>
Date: Fri, 27 Mar 2026 12:06:04 +0100
Subject: [PATCH 1/3] staging: iio: frequency: ad9834: use sysfs_emit() in show
helpers
Replace sprintf() with sysfs_emit() in ad9834_show_out0_wavetype_available
and ad9834_show_out1_wavetype_available functions to follow the recommended
sysfs API pattern for device attribute show methods.
Signed-off-by: yugmerabtene <yug.merabtene@gmail.com>
---
drivers/staging/iio/frequency/ad9834.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/iio/frequency/ad9834.c b/drivers/staging/iio/frequency/ad9834.c
index d339d5e8e043..844e92adc517 100644
--- a/drivers/staging/iio/frequency/ad9834.c
+++ b/drivers/staging/iio/frequency/ad9834.c
@@ -290,7 +290,7 @@ ssize_t ad9834_show_out0_wavetype_available(struct device *dev,
else
str = "sine triangle";
- return sprintf(buf, "%s\n", str);
+ return sysfs_emit(buf, "%s\n", str);
}
static IIO_DEVICE_ATTR(out_altvoltage0_out0_wavetype_available, 0444,
@@ -310,7 +310,7 @@ ssize_t ad9834_show_out1_wavetype_available(struct device *dev,
else
str = "square";
- return sprintf(buf, "%s\n", str);
+ return sysfs_emit(buf, "%s\n", str);
}
static IIO_DEVICE_ATTR(out_altvoltage0_out1_wavetype_available, 0444,
--
2.53.0
From 2b3834a58297044087d56d492c19a9fb3d15b7d8 Mon Sep 17 00:00:00 2001
From: yugmerabtene <yug.merabtene@gmail.com>
Date: Fri, 27 Mar 2026 12:06:30 +0100
Subject: [PATCH 2/3] staging: iio: impedance-analyzer: ad5933: use
sysfs_emit() in sysfs output
Convert all sprintf() calls in ad5933_show_frequency and ad5933_show
attribute functions to sysfs_emit() to comply with the kernel-recommended
sysfs show method convention for proper buffer length handling.
Signed-off-by: yugmerabtene <yug.merabtene@gmail.com>
---
.../staging/iio/impedance-analyzer/ad5933.c | 24 +++++++++----------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/iio/impedance-analyzer/ad5933.c b/drivers/staging/iio/impedance-analyzer/ad5933.c
index 85a4223295cd..e3aab038c5fb 100644
--- a/drivers/staging/iio/impedance-analyzer/ad5933.c
+++ b/drivers/staging/iio/impedance-analyzer/ad5933.c
@@ -285,7 +285,7 @@ static ssize_t ad5933_show_frequency(struct device *dev,
freqreg = (u64)freqreg * (u64)(st->mclk_hz / 4);
do_div(freqreg, BIT(27));
- return sprintf(buf, "%d\n", (int)freqreg);
+ return sysfs_emit(buf, "%d\n", (int)freqreg);
}
static ssize_t ad5933_store_frequency(struct device *dev,
@@ -338,27 +338,27 @@ static ssize_t ad5933_show(struct device *dev,
mutex_lock(&st->lock);
switch ((u32)this_attr->address) {
case AD5933_OUT_RANGE:
- len = sprintf(buf, "%u\n",
- st->range_avail[(st->ctrl_hb >> 1) & 0x3]);
+ len = sysfs_emit(buf, "%u\n",
+ st->range_avail[(st->ctrl_hb >> 1) & 0x3]);
break;
case AD5933_OUT_RANGE_AVAIL:
- len = sprintf(buf, "%u %u %u %u\n", st->range_avail[0],
- st->range_avail[3], st->range_avail[2],
- st->range_avail[1]);
+ len = sysfs_emit(buf, "%u %u %u %u\n", st->range_avail[0],
+ st->range_avail[3], st->range_avail[2],
+ st->range_avail[1]);
break;
case AD5933_OUT_SETTLING_CYCLES:
- len = sprintf(buf, "%d\n", st->settling_cycles);
+ len = sysfs_emit(buf, "%d\n", st->settling_cycles);
break;
case AD5933_IN_PGA_GAIN:
- len = sprintf(buf, "%s\n",
- (st->ctrl_hb & AD5933_CTRL_PGA_GAIN_1) ?
- "1" : "0.2");
+ len = sysfs_emit(buf, "%s\n",
+ (st->ctrl_hb & AD5933_CTRL_PGA_GAIN_1) ?
+ "1" : "0.2");
break;
case AD5933_IN_PGA_GAIN_AVAIL:
- len = sprintf(buf, "1 0.2\n");
+ len = sysfs_emit(buf, "1 0.2\n");
break;
case AD5933_FREQ_POINTS:
- len = sprintf(buf, "%d\n", st->freq_points);
+ len = sysfs_emit(buf, "%d\n", st->freq_points);
break;
default:
ret = -EINVAL;
--
2.53.0
From fcf4b800efdb33ee6722838e0211715d0f8738c9 Mon Sep 17 00:00:00 2001
From: yugmerabtene <yug.merabtene@gmail.com>
Date: Fri, 27 Mar 2026 13:44:51 +0100
Subject: [PATCH 3/3] github: add workflow to send kernel patches via email
---
.github/workflows/send-patches.yml | 68 ++++++++++++++++++++++++++++++
1 file changed, 68 insertions(+)
create mode 100644 .github/workflows/send-patches.yml
diff --git a/.github/workflows/send-patches.yml b/.github/workflows/send-patches.yml
new file mode 100644
index 000000000000..0f8e594d549e
--- /dev/null
+++ b/.github/workflows/send-patches.yml
@@ -0,0 +1,68 @@
+name: Send Kernel Patches
+
+on:
+ workflow_dispatch:
+ inputs:
+ smtp_password:
+ description: 'SMTP Password for contact@yug.be'
+ required: true
+ type: password
+
+jobs:
+ send-patches:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+
+ - name: Generate patches
+ run: |
+ git format-patch -3 --base=HEAD~3 -o patches/ HEAD~3..HEAD
+
+ - name: Send patches via SMTP
+ run: |
+ cat > send_patches.js << 'SCRIPT'
+ const nodemailer = require('nodemailer');
+ const fs = require('fs');
+ const path = require('path');
+
+ const transporter = nodemailer.createTransport({
+ host: 'ssl0.ovh.net',
+ port: 465,
+ secure: true,
+ auth: {
+ user: 'contact@yug.be',
+ pass: process.env.SMTP_PASSWORD
+ }
+ });
+
+ const patches = fs.readdirSync('patches').filter(f => f.endsWith('.patch'));
+
+ const mailOptions = {
+ from: 'yugmerabtene <contact@yug.be>',
+ to: 'linux-iio@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, jic23@kernel.org, gregkh@linuxfoundation.org',
+ subject: `[PATCH 0/${patches.length}] staging: iio: convert sprintf to sysfs_emit`,
+ text: `This series converts sprintf() to sysfs_emit() in staging IIO drivers (ad7816, ad9834, ad5933) to follow kernel sysfs API best practices.`,
+ attachments: patches.map(p => ({
+ filename: p,
+ path: path.join('patches', p)
+ }))
+ };
+
+ transporter.sendMail(mailOptions, (err, info) => {
+ if (err) {
+ console.error('Error:', err);
+ process.exit(1);
+ }
+ console.log('Patches sent!', info.response);
+ });
+ SCRIPT
+
+ - name: Install nodemailer and send
+ env:
+ SMTP_PASSWORD: ${{ inputs.smtp_password }}
+ run: |
+ npm install nodemailer --silent 2>/dev/null
+ node send_patches.js
--
2.53.0
On Fri, Mar 27, 2026 at 01:00:45PM +0000, yugmerabtene wrote: > This series converts sprintf() to sysfs_emit() in staging IIO drivers (ad7816, ad9834, ad5933) to follow kernel sysfs API best practices. All changes are non-functional. 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 was attached, please place it inline so that it can be applied directly from the email message itself. 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
© 2016 - 2026 Red Hat, Inc.