Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1662577

Re: [PATCH 11/11] USB: usbip: convert to use DRIVER_ATTR_RW

From Shuah Khan <shuah@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 11/11] USB: usbip: convert to use DRIVER_ATTR_RW
Date 2017-06-09 18:00 +0200
Message-ID <tQuum-3qu-13@gated-at.bofh.it> (permalink)
References <tQo5z-84n-9@gated-at.bofh.it> <tQo5C-84n-71@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 06/09/2017 03:03 AM, Greg Kroah-Hartman wrote:
> We are trying to get rid of DRIVER_ATTR(), and the usbip driver
> attribute can be trivially changed to use DRIVER_ATTR_RW().
> 
> Cc: Valentina Manea <valentina.manea.m@gmail.com>
> Cc: Shuah Khan <shuah@kernel.org>
> Cc: <linux-usb@vger.kernel.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Looks good to me.

Acked-by: Shuah Khan <shuahkh@osg.samsung.com>

thanks,
-- Shuah

> ---
>  drivers/usb/usbip/stub_main.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/usb/usbip/stub_main.c b/drivers/usb/usbip/stub_main.c
> index 44ab43fc4fcc..e74fbb7f4a32 100644
> --- a/drivers/usb/usbip/stub_main.c
> +++ b/drivers/usb/usbip/stub_main.c
> @@ -134,7 +134,7 @@ int del_match_busid(char *busid)
>  	return ret;
>  }
>  
> -static ssize_t show_match_busid(struct device_driver *drv, char *buf)
> +static ssize_t match_busid_show(struct device_driver *drv, char *buf)
>  {
>  	int i;
>  	char *out = buf;
> @@ -149,7 +149,7 @@ static ssize_t show_match_busid(struct device_driver *drv, char *buf)
>  	return out - buf;
>  }
>  
> -static ssize_t store_match_busid(struct device_driver *dev, const char *buf,
> +static ssize_t match_busid_store(struct device_driver *dev, const char *buf,
>  				 size_t count)
>  {
>  	int len;
> @@ -181,8 +181,7 @@ static ssize_t store_match_busid(struct device_driver *dev, const char *buf,
>  
>  	return -EINVAL;
>  }
> -static DRIVER_ATTR(match_busid, S_IRUSR | S_IWUSR, show_match_busid,
> -		   store_match_busid);
> +static DRIVER_ATTR_RW(match_busid);
>  
>  static ssize_t rebind_store(struct device_driver *dev, const char *buf,
>  				 size_t count)
> 

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 01/11] HID: hid-core: convert to use DRIVER_ATTR_RO and drv_groups Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-09 11:10 +0200
  [PATCH 02/11] IB: nes: convert to use DRIVER_ATTR_RW Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-09 11:10 +0200
    Re: [PATCH 02/11] IB: nes: convert to use DRIVER_ATTR_RW Bart Van Assche <Bart.VanAssche@sandisk.com> - 2017-06-09 17:30 +0200
  [PATCH 04/11] TTY: hvc: convert to use DRIVER_ATTR_RW Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-09 11:10 +0200
  [PATCH 10/11] s390: drivers: convert to use DRIVER_ATTR_RO/WO Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-09 11:10 +0200
    Re: [PATCH 10/11] s390: drivers: convert to use DRIVER_ATTR_RO/WO Heiko Carstens <heiko.carstens@de.ibm.com> - 2017-06-09 12:20 +0200
      Re: [PATCH 10/11] s390: drivers: convert to use DRIVER_ATTR_RO/WO Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-09 12:30 +0200
  [PATCH 11/11] USB: usbip: convert to use DRIVER_ATTR_RW Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-09 11:10 +0200
    Re: [PATCH 11/11] USB: usbip: convert to use DRIVER_ATTR_RW Shuah Khan <shuah@kernel.org> - 2017-06-09 18:00 +0200
  [PATCH 07/11] wireless: ipw2x00: convert to use DRIVER_ATTR_RW Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-09 11:10 +0200
    Re: [PATCH 07/11] wireless: ipw2x00: convert to use DRIVER_ATTR_RW Kalle Valo <kvalo@codeaurora.org> - 2017-06-09 11:30 +0200
      Re: [PATCH 07/11] wireless: ipw2x00: convert to use DRIVER_ATTR_RW Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-09 11:40 +0200
  [PATCH 03/11] PCI: pci-driver: convert to use DRIVER_ATTR_WO Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-09 11:10 +0200

csiph-web