On Fri, Feb 06, 2015 at 01:43:28PM +0100, Andrzej Pietrasiewicz wrote: > RNDIS function has a limitation on the number of allowed instances. > So far it has been RNDIS_MAX_CONFIGS, which happens to be one. > In order to eliminate this kind of arbitrary limitation we should not > preallocate a predefined (RNDIS_MAX_CONFIGS) array of struct rndis_params > instances but instead allow allocating them on demand. > > This patch prepares the elimination of the said limit by converting all the > functions which accept rndis config number to accept a pointer to the > actual struct rndis_params. Consequently, rndis_register() returns > a pointer to a corresponding struct rndis_params instance. The pointer > is then always used by f_rndis.c instead of config number when it talks > to rndis.c API. > > A nice side-effect of the changes is that many lines of code in rndis.c > become shorter and fit in 80 columns. > > If a function prototype changes in rndis.h a style cleanup is made > at the same time, otherwise checkpatch complains that the patch > has style problems. > > Signed-off-by: Andrzej Pietrasiewicz <andrze...@samsung.com>
doesn't build. ./drivers/usb/gadget/function//rndis.h:213:26: error: void declaration ./drivers/usb/gadget/function//rndis.h:213:26: error: Expected ; at end of declaration ./drivers/usb/gadget/function//rndis.h:213:26: error: got struct ./drivers/usb/gadget/function//rndis.h:213:26: error: void declaration ./drivers/usb/gadget/function//rndis.h:213:26: error: Expected ; at end of declaration ./drivers/usb/gadget/function//rndis.h:213:26: error: got struct drivers/usb/gadget/function/rndis.h:213:26: error: void declaration drivers/usb/gadget/function/rndis.h:213:26: error: Expected ; at end of declaration drivers/usb/gadget/function/rndis.h:213:26: error: got struct drivers/usb/gadget/function/f_rndis.c:507:52: error: not a function rndis_free_response drivers/usb/gadget/function/rndis.h:213:26: error: void declaration drivers/usb/gadget/function/rndis.h:213:26: error: Expected ; at end of declaration drivers/usb/gadget/function/rndis.h:213:26: error: got struct drivers/usb/gadget/function/rndis.c:764:36: error: not a function rndis_free_response drivers/usb/gadget/function/rndis.c:944:6: error: symbol 'rndis_free_response' redeclared with different type (originally declared at drivers/usb/gadget/function/rndis.h:213) - different base types ./drivers/usb/gadget/function//rndis.h:213:26: error: void declaration ./drivers/usb/gadget/function//rndis.h:213:26: error: Expected ; at end of declaration ./drivers/usb/gadget/function//rndis.h:213:26: error: got struct In file included from drivers/usb/gadget/legacy/ether.c:101:0: ./drivers/usb/gadget/function/rndis.h:213:26: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘struct’ void rndis_free_response struct rndis_params *params, u8 *buf); -- balbi
signature.asc
Description: Digital signature