mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stefan Agner <stefan@agner.ch>
To: balbi@kernel.org
Cc: gregkh@linuxfoundation.org, k.opasiak@samsung.com,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Stefan Agner <stefan@agner.ch>
Subject: [PATCH 2/2] fs: configfs: use hexadecimal values and new line
Date: Fri, 14 Apr 2017 18:35:09 -0700	[thread overview]
Message-ID: <20170415013509.20844-2-stefan@agner.ch> (raw)
In-Reply-To: <20170415013509.20844-1-stefan@agner.ch>

Other unsigned properties return hexadecimal values, follow this
convention when printing b_vendor_code too. Also add newlines to
the OS Descriptor support related properties, like other sysfs
files use.

Signed-off-by: Stefan Agner <stefan@agner.ch>
---
 drivers/usb/gadget/configfs.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c
index 863ca4ded1be..a22a892de7b7 100644
--- a/drivers/usb/gadget/configfs.c
+++ b/drivers/usb/gadget/configfs.c
@@ -738,7 +738,7 @@ static inline struct gadget_info *os_desc_item_to_gadget_info(
 
 static ssize_t os_desc_use_show(struct config_item *item, char *page)
 {
-	return sprintf(page, "%d",
+	return sprintf(page, "%d\n",
 			os_desc_item_to_gadget_info(item)->use_os_desc);
 }
 
@@ -762,7 +762,7 @@ static ssize_t os_desc_use_store(struct config_item *item, const char *page,
 
 static ssize_t os_desc_b_vendor_code_show(struct config_item *item, char *page)
 {
-	return sprintf(page, "%d",
+	return sprintf(page, "0x%02x\n",
 			os_desc_item_to_gadget_info(item)->b_vendor_code);
 }
 
@@ -904,7 +904,7 @@ static inline struct usb_os_desc_ext_prop
 
 static ssize_t ext_prop_type_show(struct config_item *item, char *page)
 {
-	return sprintf(page, "%d", to_usb_os_desc_ext_prop(item)->type);
+	return sprintf(page, "%d\n", to_usb_os_desc_ext_prop(item)->type);
 }
 
 static ssize_t ext_prop_type_store(struct config_item *item,
-- 
2.12.1

  reply	other threads:[~2017-04-15  1:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20170415013337epcas3p4871e4a671b352fed711acaf38803095f@epcas3p4.samsung.com>
2017-04-15  1:35 ` [PATCH 1/2] fs: configfs: make qw_sign attribute symmetric Stefan Agner
2017-04-15  1:35   ` Stefan Agner [this message]
2017-04-19  8:45     ` [PATCH 2/2] fs: configfs: use hexadecimal values and new line Krzysztof Opasiak
2017-04-19  8:53   ` [PATCH 1/2] fs: configfs: make qw_sign attribute symmetric Krzysztof Opasiak
2017-05-25  8:33     ` Stefan Agner
2017-06-02  8:25       ` Felipe Balbi
2017-02-01  2:19 Stefan Agner
2017-02-01  2:19 ` [PATCH 2/2] fs: configfs: use hexadecimal values and new line Stefan Agner
2017-02-01  8:07   ` Greg KH
2017-02-01  9:02     ` Felipe Balbi
2017-02-01 16:51       ` Stefan Agner

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=20170415013509.20844-2-stefan@agner.ch \
    --to=stefan@agner.ch \
    --cc=balbi@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=k.opasiak@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®