Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1623970 > unrolled thread
| Started by | Stefan Agner <stefan@agner.ch> |
|---|---|
| First post | 2017-04-15 03:40 +0200 |
| Last post | 2017-04-19 10:50 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 2/2] fs: configfs: use hexadecimal values and new line Stefan Agner <stefan@agner.ch> - 2017-04-15 03:40 +0200
Re: [PATCH 2/2] fs: configfs: use hexadecimal values and new line Krzysztof Opasiak <k.opasiak@samsung.com> - 2017-04-19 10:50 +0200
| From | Stefan Agner <stefan@agner.ch> |
|---|---|
| Date | 2017-04-15 03:40 +0200 |
| Subject | [PATCH 2/2] fs: configfs: use hexadecimal values and new line |
| Message-ID | <twkQW-gW-3@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Krzysztof Opasiak <k.opasiak@samsung.com> |
|---|---|
| Date | 2017-04-19 10:50 +0200 |
| Message-ID | <txTtf-1cG-5@gated-at.bofh.it> |
| In reply to | #1623970 |
On 04/15/2017 03:35 AM, Stefan Agner wrote:
> 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,
>
looks good to me:
Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
--
Krzysztof Opasiak
Samsung R&D Institute Poland
Samsung Electronics
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web