From: Sergei Shtylyov <sshtylyov@mvista.com>
To: fangxiaozhi 00110321 <fangxiaozhi@huawei.com>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
zihan@huawei.com, Lin.Lei@huawei.com, greg@kroah.com,
neil.yi@huawei.com, wangyuhua@huawei.com, huqiao36@huawei.com,
balbi@ti.com, mdharm-usb@one-eyed-alien.net,
sebastian@breakpoint.cc
Subject: Re: [PATCH 1/2]linux-usb:Define a new macro for USB storage match rules
Date: Fri, 25 Jan 2013 16:18:34 +0400 [thread overview]
Message-ID: <5102781A.8070502@mvista.com> (raw)
In-Reply-To: <fe6cef496609.6609fe6cef49@huawei.com>
Hello.
On 25-01-2013 6:44, fangxiaozhi 00110321 wrote:
> From: fangxiaozhi <huananhu@huawei.com>
> 1. Define a new macro for USB storage match rules:
> matching with Vendor ID and interface descriptors.
> Signed-off-by: fangxiaozhi <huananhu@huawei.com>
> --------------------------------------------------------------------
>
> diff -uprN linux-3.8-rc4_orig/drivers/usb/storage/usb.c linux-3.8-rc4/drivers/usb/storage/usb.c
> --- linux-3.8-rc4_orig/drivers/usb/storage/usb.c 2013-01-22 14:12:42.595238727 +0800
> +++ linux-3.8-rc4/drivers/usb/storage/usb.c 2013-01-22 14:16:01.398250305 +0800
> @@ -120,6 +120,17 @@ MODULE_PARM_DESC(quirks, "supplemental l
> .useTransport = use_transport, \
> }
>
> +#define UNUSUAL_VENDOR_INTF(idVendor, cl, sc, pr, \
> + vendor_name, product_name, use_protocol, use_transport, \
> + init_function, Flags) \
> +{ \
> + .vendorName = vendor_name, \
> + .productName = product_name, \
> + .useProtocol = use_protocol, \
> + .useTransport = use_transport, \
> + .initFunction = init_function, \
> +}
Shouldn't the field initilaizers be indented with tab, not space?
> diff -uprN linux-3.8-rc4_orig/drivers/usb/storage/usual-tables.c linux-3.8-rc4/drivers/usb/storage/usual-tables.c
> --- linux-3.8-rc4_orig/drivers/usb/storage/usual-tables.c 2013-01-22 14:12:42.594238726 +0800
> +++ linux-3.8-rc4/drivers/usb/storage/usual-tables.c 2013-01-22 14:16:01.426250199 +0800
> @@ -41,6 +41,19 @@
> #define USUAL_DEV(useProto, useTrans) \
> { USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, useProto, useTrans) }
>
> +/* Define the device is matched with Vendor ID and interface descriptors */
> +#define UNUSUAL_VENDOR_INTF(id_vendor, cl, sc, pr, \
> + vendorName, productName, useProtocol, useTransport, \
> + initFunction, flags) \
> +{ \
> + .match_flags = USB_DEVICE_ID_MATCH_INT_INFO \
> + | USB_DEVICE_ID_MATCH_VENDOR, \
> + .idVendor = (id_vendor), \
> + .bInterfaceClass = (cl), \
> + .bInterfaceSubClass = (sc), \
> + .bInterfaceProtocol = (pr), \
> + .driver_info = (flags) }
Same question. And trailing '}' should be on a separate line.
WBR, Sergei
next prev parent reply other threads:[~2013-01-25 12:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-25 2:44 fangxiaozhi 00110321
2013-01-25 12:18 ` Sergei Shtylyov [this message]
2013-01-25 17:44 ` Greg KH
2013-01-26 1:39 ` Fangxiaozhi (Franko)
2013-01-26 2:05 ` Greg KH
2013-01-26 3:10 ` Matthew Dharm
2013-01-26 3:38 ` Greg KH
2013-01-27 18:42 ` Sebastian Andrzej Siewior
-- strict thread matches above, loose matches on Subject: below --
2013-02-04 7:14 fangxiaozhi 00110321
2012-12-18 2:42 fangxiaozhi 00110321
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=5102781A.8070502@mvista.com \
--to=sshtylyov@mvista.com \
--cc=Lin.Lei@huawei.com \
--cc=balbi@ti.com \
--cc=fangxiaozhi@huawei.com \
--cc=greg@kroah.com \
--cc=huqiao36@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mdharm-usb@one-eyed-alien.net \
--cc=neil.yi@huawei.com \
--cc=sebastian@breakpoint.cc \
--cc=wangyuhua@huawei.com \
--cc=zihan@huawei.com \
/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®