Skip to contentSkip to conversation

staging: Replace snprintf() with scnprintf()

PATCH In review Sumera Priyadarsini 8 participants 20 messages Oct 15, 2020 – Oct 27, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover staging: Replace snprintf() with scnprintf()

The show() methods in device attributes should return the number of bytes printed into the buffer which is the return value of scnprintf(). snprintf() returns the potential number of bytes that could be written which may be greater than the actual length to be written.

This patchset is a series of trivial changes across the staging directory to replace snprintf with scnprintf in the relevant files.

Sumera Priyadarsini (3):
staging: fbtft: Replace snprintf() with scnprintf()
staging: fieldbus: Replace snprintf() with scnprintf()
staging: comedi: Replace snprintf() with scnprintf()

 drivers/staging/comedi/comedi_fops.c | 8 ++++----
 drivers/staging/fbtft/fbtft-sysfs.c  | 2 +-
 drivers/staging/fieldbus/dev_core.c  | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/3 staging: fbtft: Replace snprintf() with scnprintf()

The show_debug() method should return the number of bytes printed into the buffer which is the return value of scnprintf(). snprintf() returns the potential number of bytes that could be written which may be greater than the actual length to be written.

Replace snprintf() with the safer scnprintf() in fbtft-sysfs.c.

Issue found with Coccinelle.

---
 drivers/staging/fbtft/fbtft-sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/fbtft/fbtft-sysfs.c +1 -1
index 26e52cc2de64..7df92db648d6 100644
@@ -199,7 +199,7 @@ static ssize_t show_debug(struct device *device,
 	struct fb_info *fb_info = dev_get_drvdata(device);
 	struct fbtft_par *par = fb_info->par;
 
-	return snprintf(buf, PAGE_SIZE, "%lu\n", par->debug);
+	return scnprintf(buf, PAGE_SIZE, "%lu\n", par->debug);
 }
 
 static struct device_attribute debug_device_attr =
Signature · 1 line
2.25.1
#2 lore raw

PATCH 2/3 staging: fieldbus: Replace snprintf() with scnprintf()

In reply to Sumera Priyadarsini

The card_name_show() method should return the number of bytes printed into the buffer which is the return value of scnprintf(). snprintf() returns the potential number of bytes that could be written which may be greater than the actual length to be written.

Replace snprintf() with the safer scnprintf() in dev_core.c.

Issue found with Coccinelle.

---
 drivers/staging/fieldbus/dev_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/fieldbus/dev_core.c +1 -1
index 1ba0234cc60d..a0fcd87a1747 100644
@@ -70,7 +70,7 @@ static ssize_t card_name_show(struct device *dev, struct device_attribute *attr,
 	 * card_name was provided by child driver, could potentially be long.
 	 * protect against buffer overrun.
 	 */
-	return snprintf(buf, PAGE_SIZE, "%s\n", fb->card_name);
+	return scnprintf(buf, PAGE_SIZE, "%s\n", fb->card_name);
 }
 static DEVICE_ATTR_RO(card_name);
 
Signature · 1 line
2.25.1
#3 lore raw

Re: [Outreachy][PATCH 2/3] staging: fieldbus: Replace snprintf() with scnprintf()

Hello Sumera, thank you for the patch !

Unfortunately, I think Deepak R Varma sent a patch on 18 October which appears to solve this issue in a "better" way, by using sysfs_emit().

I would link to their patch, but I can't seem to find a server hosting the outreachy mailing list.

Quoted 31 lines · Sumera Priyadarsini

The card_name_show() method should return the number of bytes printed into the buffer which is the return value of scnprintf(). snprintf() returns the potential number of bytes that could be written which may be greater than the actual length to be written.

Replace snprintf() with the safer scnprintf() in dev_core.c.

Issue found with Coccinelle.

---
 drivers/staging/fieldbus/dev_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/fieldbus/dev_core.c +1 -2
index 1ba0234cc60d..a0fcd87a1747 100644
@@ -70,7 +70,7 @@ static ssize_t card_name_show(struct device *dev, struct device_attribute *attr,
         * card_name was provided by child driver, could potentially be long.
         * protect against buffer overrun.
         */
-       return snprintf(buf, PAGE_SIZE, "%s\n", fb->card_name);
+       return scnprintf(buf, PAGE_SIZE, "%s\n", fb->card_name);
 }
 static DEVICE_ATTR_RO(card_name);
 
--

2.25.1

#4 lore raw

Re: [Outreachy][PATCH 2/3] staging: fieldbus: Replace snprintf() with scnprintf()

Quoted 8 lines · Sven Van Asbroeck,

Hello Sumera, thank you for the patch !

Unfortunately, I think Deepak R Varma sent a patch on 18 October which appears to solve this issue in a "better" way, by using sysfs_emit().

I would link to their patch, but I can't seem to find a server hosting the outreachy mailing list.

Hi Sven,

No worries- Deepak sent the patch before I could send a v2 but it's alright. No need to send a link- sysfs_emit() is indeed the better way to do it.

Warm regards,
Sumera

Quoted 39 lines
Quoted 2 lines · Sumera Priyadarsini

The card_name_show() method should return the number of bytes printed

into

Quoted 1 line

the buffer which is the return value of scnprintf(). snprintf() returns

the

Quoted 5 lines

potential number of bytes that could be written which may be greater than the actual length to be written.

Replace snprintf() with the safer scnprintf() in dev_core.c.

Review

Quoted 8 lines

Issue found with Coccinelle.

---
 drivers/staging/fieldbus/dev_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/staging/fieldbus/dev_core.c

drivers/staging/fieldbus/dev_core.c static ssize_t card_name_show(struct device *dev,

Quoted 4 lines

index 1ba0234cc60d..a0fcd87a1747 100644

drivers/staging/fieldbus/dev_core.c +0 -0
@@ -70,7 +70,7 @@ static ssize_t card_name_show(struct device *dev,

struct device_attribute *attr,

drivers/staging/fieldbus/dev_core.c static ssize_t card_name_show(struct device *dev, · line 70

Quoted 1 line
drivers/staging/fieldbus/dev_core.c +0 -0
         * card_name was provided by child driver, could potentially be

long.

Quoted 10 lines
drivers/staging/fieldbus/dev_core.c +1 -2
         * protect against buffer overrun.
         */
-       return snprintf(buf, PAGE_SIZE, "%s\n", fb->card_name);
+       return scnprintf(buf, PAGE_SIZE, "%s\n", fb->card_name);
 }
 static DEVICE_ATTR_RO(card_name);
 
--

2.25.1

#5 lore raw

PATCH 3/3 staging: comedi: Replace snprintf() with scnprintf()

In reply to Sumera Priyadarsini

The show() methods should return the number of bytes printed into the buffer which is the return value of scnprintf(). snprintf() returns the potential number of bytes that could be written which may be greater than the actual length to be written.

Replace snprintf() with the safer scnprintf() in comedi_fops.c.

Issue found with Coccinelle.

---
 drivers/staging/comedi/comedi_fops.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/comedi/comedi_fops.c +4 -4
index d99231c737fb..c9ab36792f00 100644
@@ -396,7 +396,7 @@ static ssize_t max_read_buffer_kb_show(struct device *csdev,
 	mutex_unlock(&dev->mutex);
 
 	comedi_dev_put(dev);
-	return snprintf(buf, PAGE_SIZE, "%u\n", size);
+	return scnprintf(buf, PAGE_SIZE, "%u\n", size);
 }
 
 static ssize_t max_read_buffer_kb_store(struct device *csdev,
@@ -452,7 +452,7 @@ static ssize_t read_buffer_kb_show(struct device *csdev,
 	mutex_unlock(&dev->mutex);
 
 	comedi_dev_put(dev);
-	return snprintf(buf, PAGE_SIZE, "%u\n", size);
+	return scnprintf(buf, PAGE_SIZE, "%u\n", size);
 }
 
 static ssize_t read_buffer_kb_store(struct device *csdev,
@@ -509,7 +509,7 @@ static ssize_t max_write_buffer_kb_show(struct device *csdev,
 	mutex_unlock(&dev->mutex);
 
 	comedi_dev_put(dev);
-	return snprintf(buf, PAGE_SIZE, "%u\n", size);
+	return scnprintf(buf, PAGE_SIZE, "%u\n", size);
 }
 
 static ssize_t max_write_buffer_kb_store(struct device *csdev,
@@ -565,7 +565,7 @@ static ssize_t write_buffer_kb_show(struct device *csdev,
 	mutex_unlock(&dev->mutex);
 
 	comedi_dev_put(dev);
-	return snprintf(buf, PAGE_SIZE, "%u\n", size);
+	return scnprintf(buf, PAGE_SIZE, "%u\n", size);
 }
 
 static ssize_t write_buffer_kb_store(struct device *csdev,
Signature · 1 line
2.25.1
#6 lore raw

Re: [Outreachy][PATCH 3/3] staging: comedi: Replace snprintf() with scnprintf()

Quoted 10 lines · Sumera Priyadarsini

The show() methods should return the number of bytes printed into the buffer which is the return value of scnprintf(). snprintf() returns the potential number of bytes that could be written which may be greater than the actual length to be written.

Replace snprintf() with the safer scnprintf() in comedi_fops.c.

Issue found with Coccinelle.

The patch is fine, but there are a couple of problems.

1) Patches for "staging" should be Cc'ed to [email protected] .

2) It appears to be part of a patch series, but I have no clue about the other patches in the series because I haven't seen them. The patch doesn't look like it depends on any other patches in a series, so it should be a standalone patch, not part of a series.

Signature · 4 lines
-=( Ian Abbott <[email protected]> || MEV Ltd. is a company  )=-
-=( registered in England & Wales.  Regd. number: 02862268.  )=-
-=( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=-
-=( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || www.mev.co.uk )=-
#7 lore raw

Re: [Outreachy][PATCH 3/3] staging: comedi: Replace snprintf() with scnprintf()

Quoted 8 lines · Ian Abbott,
Quoted 7 lines · Sumera Priyadarsini

The show() methods should return the number of bytes printed into the buffer which is the return value of scnprintf(). snprintf() returns the potential number of bytes that could be written which may be greater than the actual length to be written.

Replace snprintf() with the safer scnprintf() in comedi_fops.c.

Quoted 8 lines
Quoted 3 lines

Issue found with Coccinelle.

The patch is fine, but there are a couple of problems.

1) Patches for "staging" should be Cc'ed to [email protected] .

My bad, I'll keep this in mind for future patches.

Quoted 5 lines

2) It appears to be part of a patch series, but I have no clue about the other patches in the series because I haven't seen them. The patch doesn't look like it depends on any other patches in a series, so it should be a standalone patch, not part of a series.

I am not exactly sure why this happened, but now that you point it out, the patches seem a bit disjoint in my mail as well. I think it's because I Cc'ed the different patches differently. :(

The patch series comprised a series of changes across staging to replace snprintf() with scnprintf(). But I got a review about the recent incorporation of 'sysfs_emit()' in the kernel and I should use that instead, so I'll be sending a V2 shortly.

Thanks,
Sumera

Quoted 5 lines
-=( Ian Abbott <[email protected]> || MEV Ltd. is a company  )=-
-=( registered in England & Wales.  Regd. number: 02862268.  )=-

-=( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=- -=( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || www.mev.co.uk )=-

#8 lore raw

Re: [Outreachy kernel] Re: [Outreachy][PATCH 3/3] staging: comedi: Replace snprintf() with scnprintf()

In reply to Ian Abbott
Quoted 8 lines · Ian Abbott
Quoted 7 lines · Sumera Priyadarsini

The show() methods should return the number of bytes printed into the buffer which is the return value of scnprintf(). snprintf() returns the potential number of bytes that could be written which may be greater than the actual length to be written.

Replace snprintf() with the safer scnprintf() in comedi_fops.c.

Quoted 7 lines
Quoted 3 lines

Issue found with Coccinelle.

The patch is fine, but there are a couple of problems.

1) Patches for "staging" should be Cc'ed to [email protected] .

Hi Ian,
Does this apply to ALL drivers under "staging" or only the comedi series drivers?

Thank you,
Deepak.

Quoted 16 lines

2) It appears to be part of a patch series, but I have no clue about the other patches in the series because I haven't seen them. The patch doesn't look like it depends on any other patches in a series, so it should be a standalone patch, not part of a series.

Signature · 9 lines
-=( Ian Abbott <[email protected]> || MEV Ltd. is a company  )=-
-=( registered in England & Wales.  Regd. number: 02862268.  )=-
-=( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=-
-=( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || www.mev.co.uk )=-

-- 
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/825f5868-49f4-509d-638d-5fcab59c8f1a%40mev.co.uk.
#9 lore raw

Re: [Outreachy kernel] Re: [Outreachy][PATCH 3/3] staging: comedi: Replace snprintf() with scnprintf()

Hi Deepak and Ian,

Quoted 14 lines · Deepak R Varma
Quoted 12 lines · Ian Abbott
Quoted 10 lines · Sumera Priyadarsini

The show() methods should return the number of bytes printed into the buffer which is the return value of scnprintf(). snprintf() returns the potential number of bytes that could be written which may be greater than the actual length to be written.

Replace snprintf() with the safer scnprintf() in comedi_fops.c.

Issue found with Coccinelle.

Quoted 7 lines
Quoted 3 lines

The patch is fine, but there are a couple of problems.

1) Patches for "staging" should be Cc'ed to [email protected] .

Hi Ian,
Does this apply to ALL drivers under "staging" or only the comedi series drivers?

You can find this answer in the MAINTAINERS file :) Check here:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/MAINTAINERS#n16640

get_maintainer.pl basically reads the content of MAINTAINERS file to inform you who you should send the patch.

But the tutorial[1] uses "--nol" option in get_maintainer.pl script (which removes mailing lists from the output).

[1] https://kernelnewbies.org/FirstKernelPatch#Submit_a_patch

Which I suppose is because "the maintainers of staging/vc04_services would prefer not to be CCd on Outreachy patches", but I guess this only applies to staging/vc04_services.

I would like to confirm that only staging/vc04_services should use --nol, so we can improve the tutorial.

Regards,
Helen

Quoted 25 lines

Thank you,
Deepak.

Quoted 9 lines

2) It appears to be part of a patch series, but I have no clue about the other patches in the series because I haven't seen them. The patch doesn't look like it depends on any other patches in a series, so it should be a standalone patch, not part of a series.

--

-=( Ian Abbott <[email protected]> || MEV Ltd. is a company  )=-
-=( registered in England & Wales.  Regd. number: 02862268.  )=-
Quoted 7 lines

-=( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=- -=( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || www.mev.co.uk )=-

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/825f5868-49f4-509d-638d-5fcab59c8f1a%40mev.co.uk.

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20201018195136.GA73063%40ubuntu204.

#10 lore raw

Re: [Outreachy kernel] Re: [Outreachy][PATCH 3/3] staging: comedi: Replace snprintf() with scnprintf()

Quoted 35 lines · Helen Koike

Hi Deepak and Ian,

Quoted 14 lines · Deepak R Varma
Quoted 12 lines · Ian Abbott
Quoted 10 lines · Sumera Priyadarsini

The show() methods should return the number of bytes printed into the buffer which is the return value of scnprintf(). snprintf() returns the potential number of bytes that could be written which may be greater than the actual length to be written.

Replace snprintf() with the safer scnprintf() in comedi_fops.c.

Issue found with Coccinelle.

Quoted 7 lines
Quoted 3 lines

The patch is fine, but there are a couple of problems.

1) Patches for "staging" should be Cc'ed to [email protected] .

Hi Ian,
Does this apply to ALL drivers under "staging" or only the comedi series drivers?

You can find this answer in the MAINTAINERS file :) Check here:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/MAINTAINERS#n16640

get_maintainer.pl basically reads the content of MAINTAINERS file to inform you who you should send the patch.

But the tutorial[1] uses "--nol" option in get_maintainer.pl script (which removes mailing lists from the output).

Quoted 8 lines

[1] https://kernelnewbies.org/FirstKernelPatch#Submit_a_patch

Which I suppose is because "the maintainers of staging/vc04_services would prefer not to be CCd on Outreachy patches", but I guess this only applies to staging/vc04_services.

I would like to confirm that only staging/vc04_services should use --nol, so we can improve the tutorial.

In the beginning, no maintainers got CCd, but some were not happy to have things happening to their code without their knowledge.

So as a compromise we decided that patches could go to the people listed in the maintainers file, without spamming everyone who might be on the mailing list.

The volume of patches seems to be down, and the quality perhaps a bit up, so it would probably be reasonable to add the mailing lists back in.

julia

#11 lore raw
In reply to Sumera Priyadarsini
Quoted 4 lines · Sumera Priyadarsini

The show() methods in device attributes should return the number of bytes printed into the buffer which is the return value of scnprintf(). snprintf() returns the potential number of bytes that could be written which may be greater than the actual length to be written.

There's a big patchset just gone into 5.10 yesterday which adds a new sysfs_emit() for show methods. You probably want to use that instead of scnprintf().

maintainer
#12 lore raw
Quoted 9 lines · Matthew Wilcox
Quoted 4 lines · Sumera Priyadarsini

The show() methods in device attributes should return the number of bytes printed into the buffer which is the return value of scnprintf(). snprintf() returns the potential number of bytes that could be written which may be greater than the actual length to be written.

There's a big patchset just gone into 5.10 yesterday which adds a new sysfs_emit() for show methods. You probably want to use that instead of scnprintf().

Yes, please do that instead, I will not take these as-is, sorry.

thanks,

greg k-h

#13 lore raw
In reply to Matthew Wilcox
Quoted 10 lines · Matthew Wilcox,
Quoted 4 lines · Sumera Priyadarsini

The show() methods in device attributes should return the number of bytes printed into the buffer which is the return value of scnprintf(). snprintf() returns the potential number of bytes that could be written which may be greater than the actual length to be written.

There's a big patchset just gone into 5.10 yesterday which adds a new sysfs_emit() for show methods. You probably want to use that instead of scnprintf().

Thanks for letting me know! I will revise and send a v2.

regards,
Sumera

Quoted 1 line
#14 lore raw
In reply to Matthew Wilcox
Quoted 10 lines · Matthew Wilcox
Quoted 4 lines · Sumera Priyadarsini

The show() methods in device attributes should return the number of bytes printed into the buffer which is the return value of scnprintf(). snprintf() returns the potential number of bytes that could be written which may be greater than the actual length to be written.

There's a big patchset just gone into 5.10 yesterday which adds a new sysfs_emit() for show methods. You probably want to use that instead of scnprintf().

Hello Matthew,
I am able to build my staging branch into 5.9.0-rc8 release. Can you please suggest how can I get 5.10?

Thank you,
Deepak.

Quoted 4 lines
Signature · 3 lines
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20201015192157.GC20115%40casper.infradead.org.
maintainer
#15 lore raw
Quoted 7 lines · Deepak R Varma
Quoted 6 lines · Matthew Wilcox
Quoted 4 lines · Sumera Priyadarsini

The show() methods in device attributes should return the number of bytes printed into the buffer which is the return value of scnprintf(). snprintf() returns the potential number of bytes that could be written which may be greater than the actual length to be written.

Quoted 7 lines
Quoted 4 lines

There's a big patchset just gone into 5.10 yesterday which adds a new sysfs_emit() for show methods. You probably want to use that instead of scnprintf().

Hello Matthew,
I am able to build my staging branch into 5.9.0-rc8 release. Can you please suggest how can I get 5.10?

Pull from Linus's tree right now, or pull from linux-next.

#16 lore raw
Quoted 12 lines · Greg KH
Quoted 11 lines · Deepak R Varma
Quoted 10 lines · Matthew Wilcox
Quoted 4 lines · Sumera Priyadarsini

The show() methods in device attributes should return the number of bytes printed into the buffer which is the return value of scnprintf(). snprintf() returns the potential number of bytes that could be written which may be greater than the actual length to be written.

There's a big patchset just gone into 5.10 yesterday which adds a new sysfs_emit() for show methods. You probably want to use that instead of scnprintf().

Quoted 5 lines
Quoted 3 lines

Hello Matthew,
I am able to build my staging branch into 5.9.0-rc8 release. Can you please suggest how can I get 5.10?

Pull from Linus's tree right now, or pull from linux-next.

Thank you Greg. I assume you are fine with patches sent from that tree base.

Deepak.

maintainer
#17 lore raw
Quoted 13 lines · Deepak R Varma
Quoted 12 lines · Greg KH
Quoted 11 lines · Deepak R Varma
Quoted 10 lines · Matthew Wilcox
Quoted 4 lines · Sumera Priyadarsini

The show() methods in device attributes should return the number of bytes printed into the buffer which is the return value of scnprintf(). snprintf() returns the potential number of bytes that could be written which may be greater than the actual length to be written.

There's a big patchset just gone into 5.10 yesterday which adds a new sysfs_emit() for show methods. You probably want to use that instead of scnprintf().

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Hello Matthew,
I am able to build my staging branch into 5.9.0-rc8 release. Can you please suggest how can I get 5.10?

Pull from Linus's tree right now, or pull from linux-next.

Thank you Greg. I assume you are fine with patches sent from that tree base.

For the time up to 5.10-rc1, no, you need to work off of my staging-testing branch as there is no way for me to merge new stuff into linux-next until 5.10-rc1 comes out, sorry.

The middle of the merge window is a rough time to try to get new work done, maintainers are not allowed to really take it. I'm trying to be nice and stage stuff for the outreachy developers, so please, work off of staging-testing for now.

thanks,

greg k-h

#18 lore raw
Quoted 23 lines · Greg KH
Quoted 13 lines · Deepak R Varma
Quoted 12 lines · Greg KH
Quoted 11 lines · Deepak R Varma
Quoted 10 lines · Matthew Wilcox
Quoted 4 lines · Sumera Priyadarsini

The show() methods in device attributes should return the number of bytes printed into the buffer which is the return value of scnprintf(). snprintf() returns the potential number of bytes that could be written which may be greater than the actual length to be written.

There's a big patchset just gone into 5.10 yesterday which adds a new sysfs_emit() for show methods. You probably want to use that instead of scnprintf().

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Hello Matthew,
I am able to build my staging branch into 5.9.0-rc8 release. Can you please suggest how can I get 5.10?

Pull from Linus's tree right now, or pull from linux-next.

Thank you Greg. I assume you are fine with patches sent from that tree base.

Quoted 8 lines

For the time up to 5.10-rc1, no, you need to work off of my staging-testing branch as there is no way for me to merge new stuff into linux-next until 5.10-rc1 comes out, sorry.

The middle of the merge window is a rough time to try to get new work done, maintainers are not allowed to really take it. I'm trying to be nice and stage stuff for the outreachy developers, so please, work off of staging-testing for now.

Thank you Greg. I understand.
In that case, the three patches I sent yesterday were from the linux-next tree. Will you reject those or hold back?

Deepak.

Quoted 4 lines

thanks,

greg k-h

maintainer
#19 lore raw
Quoted 28 lines · Deepak R Varma
Quoted 27 lines · Greg KH
Quoted 13 lines · Deepak R Varma
Quoted 12 lines · Greg KH
Quoted 11 lines · Deepak R Varma
Quoted 10 lines · Matthew Wilcox
Quoted 4 lines · Sumera Priyadarsini

The show() methods in device attributes should return the number of bytes printed into the buffer which is the return value of scnprintf(). snprintf() returns the potential number of bytes that could be written which may be greater than the actual length to be written.

There's a big patchset just gone into 5.10 yesterday which adds a new sysfs_emit() for show methods. You probably want to use that instead of scnprintf().

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Hello Matthew,
I am able to build my staging branch into 5.9.0-rc8 release. Can you please suggest how can I get 5.10?

Pull from Linus's tree right now, or pull from linux-next.

Thank you Greg. I assume you are fine with patches sent from that tree base.

For the time up to 5.10-rc1, no, you need to work off of my staging-testing branch as there is no way for me to merge new stuff into linux-next until 5.10-rc1 comes out, sorry.

Quoted 8 lines
Quoted 4 lines

The middle of the merge window is a rough time to try to get new work done, maintainers are not allowed to really take it. I'm trying to be nice and stage stuff for the outreachy developers, so please, work off of staging-testing for now.

Thank you Greg. I understand.
In that case, the three patches I sent yesterday were from the linux-next tree. Will you reject those or hold back?

I do not know, let me get around to reviewing them in the next few days...

greg k-h