Re: [PATCH v4] Add support for using a MAX3421E chip as a host driver.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 11, 2014 at 11:55:51PM -0600, David Mosberger wrote:
> This is v4 of the patch.  Compared to v3, the only changes are:
> 
> 	- addition of a platform-data header file which allows a platform
> 	  to define which general-purpose output pin controls Vbus (if any)
> 	- spi_wr_fifo/spi_rd_fifo got renamed to spi_wr_buf/spi_rd_buf,
> 	  respectively, since that more accurately reflects their function
> 	  (whether or not a FIFO is being written depends on the register
> 	   number).
> 
> Signed-off-by: David Mosberger <davidm@xxxxxxxxxx>
> ---
>  drivers/usb/Makefile                      |    1 +
>  drivers/usb/host/Kconfig                  |   11 +
>  drivers/usb/host/Makefile                 |    1 +
>  drivers/usb/host/max3421-hcd.c            | 1937 +++++++++++++++++++++++++++++
>  include/linux/platform_data/max3421-hcd.h |   23 +
>  5 files changed, 1973 insertions(+)
>  create mode 100644 drivers/usb/host/max3421-hcd.c
>  create mode 100644 include/linux/platform_data/max3421-hcd.h

I get a number of build warnings when building this code:

drivers/usb/host/max3421-hcd.c: In function ‘max3421_transfer_out’:
drivers/usb/host/max3421-hcd.c:570:4: warning: format ‘%zu’ expects argument of type ‘size_t’, but argument 5 has type ‘int’ [-Wformat=]
    __func__, max_packet, MAX3421_FIFO_SIZE);

In file included from /ssd/gregkh-linux/work/usb/arch/x86/include/asm/percpu.h:44:0,
                 from /ssd/gregkh-linux/work/usb/arch/x86/include/asm/preempt.h:5,
                 from include/linux/preempt.h:18,
                 from include/linux/spinlock.h:50,
                 from include/linux/seqlock.h:35,
                 from include/linux/time.h:5,
                 from include/linux/stat.h:18,
                 from include/linux/module.h:10,
                 from drivers/usb/host/max3421-hcd.c:58:
include/linux/kernel.h:713:17: warning: comparison of distinct pointer types lacks a cast [enabled by default]
  (void) (&_min1 == &_min2);  \
                 ^
drivers/usb/host/max3421-hcd.c:574:26: note: in expansion of macro ‘min’
  max3421_hcd->curr_len = min((urb->transfer_buffer_length -
                          ^
drivers/usb/host/max3421-hcd.c: In function ‘max3421_transfer_in_done’:
drivers/usb/host/max3421-hcd.c:977:4: warning: format ‘%zu’ expects argument of type ‘size_t’, but argument 5 has type ‘int’ [-Wformat=]
    __func__, max_packet, MAX3421_FIFO_SIZE);
    ^

which I could live with and accept a follow-on patch, but then it breaks the build:

ERROR: "spi_register_driver" [drivers/usb/host/max3421-hcd.ko] undefined!
ERROR: "spi_sync" [drivers/usb/host/max3421-hcd.ko] undefined!
ERROR: "spi_setup" [drivers/usb/host/max3421-hcd.ko] undefined!


It looks like the Kconfig dependancies are not correct.

Care to fix that up, and resend this patch?  Also, the changelog text above
needs some work, no one cares what changed from the previous submission once
the code is in the tree, they just want to know what the code does, put the
"this changed" stuff below the cut line.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux