Re: [PATCH 7/8] staging: Remove OOM message after input_allocate_device
On 10/23/13 20:14, Joe Perches wrote: > Emitting an OOM message isn't necessary after input_allocate_device > as there's a generic OOM and a dump_stack already done. > > Signed-off-by: Joe Perches Acked-by: Jonathan Cameron (for iio driver) > --- > drivers/staging/cptm1217/clearpad_tm1217.c| 2 -- > drivers/staging/iio/adc/mxs-lradc.c | 4 +--- > drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c | 2 -- > 3 files changed, 1 insertion(+), 7 deletions(-) > > diff --git a/drivers/staging/cptm1217/clearpad_tm1217.c > b/drivers/staging/cptm1217/clearpad_tm1217.c > index 42a5f5c..ca4c2c6 100644 > --- a/drivers/staging/cptm1217/clearpad_tm1217.c > +++ b/drivers/staging/cptm1217/clearpad_tm1217.c > @@ -457,8 +457,6 @@ static int cp_tm1217_probe(struct i2c_client *client, > for (i = 0; i < TOUCH_SUPPORTED; i++) { > input_dev = input_allocate_device(); > if (input_dev == NULL) { > - dev_err(ts->dev, > - "cp_tm1217:Input Device Struct alloc failed\n"); > retval = -ENOMEM; > goto fail; > } > diff --git a/drivers/staging/iio/adc/mxs-lradc.c > b/drivers/staging/iio/adc/mxs-lradc.c > index 9da64bf..696fbb3 100644 > --- a/drivers/staging/iio/adc/mxs-lradc.c > +++ b/drivers/staging/iio/adc/mxs-lradc.c > @@ -529,10 +529,8 @@ static int mxs_lradc_ts_register(struct mxs_lradc *lradc) > return 0; > > input = input_allocate_device(); > - if (!input) { > - dev_err(dev, "Failed to allocate TS device!\n"); > + if (!input) > return -ENOMEM; > - } > > input->name = DRIVER_NAME; > input->id.bustype = BUS_HOST; > diff --git a/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c > b/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c > index 386362c..28b3930 100644 > --- a/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c > +++ b/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c > @@ -911,8 +911,6 @@ static int synaptics_rmi4_probe > > rmi4_data->input_dev = input_allocate_device(); > if (rmi4_data->input_dev == NULL) { > - dev_err(&client->dev, "%s:input device alloc failed\n", > - __func__); > retval = -ENOMEM; > goto err_input; > } > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH NEXT 1/5] staging: r8188eu: Fix sparse warnings in ioctl_linux.c
I have looked at how this is called from ioctl_private_call() and it seems like these are actual user pointers and the code is buggy. The patch silences the warnings instead of fixing the bugs. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH NEXT 5/5] staging: r8188eu: Fix sparse warnings in rtl_p2p.c
The patches 2-5 seem ok. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH NEXT 1/5] staging: r8188eu: Fix sparse warnings in ioctl_linux.c
On 10/24/2013 05:10 AM, Dan Carpenter wrote: I have looked at how this is called from ioctl_private_call() and it seems like these are actual user pointers and the code is buggy. The patch silences the warnings instead of fixing the bugs. Thanks for the review. Greg - please drop this one and take only 2-5. Do you want a resubmission? Larry ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH NEXT 1/5] staging: r8188eu: Fix sparse warnings in ioctl_linux.c
On Thu, Oct 24, 2013 at 09:46:53AM -0500, Larry Finger wrote: > On 10/24/2013 05:10 AM, Dan Carpenter wrote: > > I have looked at how this is called from ioctl_private_call() and it > > seems like these are actual user pointers and the code is buggy. The > > patch silences the warnings instead of fixing the bugs. > > Thanks for the review. > > Greg - please drop this one and take only 2-5. Do you want a resubmission? I can just drop it. I'm way behind on patches due to the kernel summit and LinuxCon, so it will be a week or so before I can catch up, sorry. greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] drivers: staging: speakup: serialio: delay initializing 'old_serial_port.baud_base'
On Wed, Oct 23, 2013 at 11:20:12AM +0800, Chen Gang wrote: > For some architectures (e.g. arc), BASE_BAUD cannot be constant number. > So have to delay initializing 'old_serial_port.baud_base', or can not > pass compiling. > > The related error (allmodconfig for arc with gcc-4.8.0): > > CC [M] drivers/staging/speakup/serialio.o > drivers/staging/speakup/serialio.c:12:2: error: initializer element is not > constant > SERIAL_PORT_DFNS > ^ > drivers/staging/speakup/serialio.c:12:2: error: (near initialization for > 'rs_table[0].baud_base') > drivers/staging/speakup/serialio.c:12:2: error: initializer element is not > constant > drivers/staging/speakup/serialio.c:12:2: error: (near initialization for > 'rs_table[1].baud_base') > drivers/staging/speakup/serialio.c:12:2: error: initializer element is not > constant > drivers/staging/speakup/serialio.c:12:2: error: (near initialization for > 'rs_table[2].baud_base') > drivers/staging/speakup/serialio.c:12:2: error: initializer element is not > constant > drivers/staging/speakup/serialio.c:12:2: error: (near initialization for > 'rs_table[3].baud_base') > > > Signed-off-by: Chen Gang > --- > drivers/staging/speakup/serialio.c |7 +-- > drivers/staging/speakup/serialio.h | 10 +- > 2 files changed, 10 insertions(+), 7 deletions(-) > > diff --git a/drivers/staging/speakup/serialio.c > b/drivers/staging/speakup/serialio.c > index 1354288..c337fea 100644 > --- a/drivers/staging/speakup/serialio.c > +++ b/drivers/staging/speakup/serialio.c > @@ -8,7 +8,7 @@ > > static void start_serial_interrupt(int irq); > > -static const struct old_serial_port rs_table[] = { > +static struct old_serial_port rs_table[] = { > SERIAL_PORT_DFNS > }; > static const struct old_serial_port *serstate; > @@ -19,9 +19,12 @@ const struct old_serial_port *spk_serial_init(int index) > int baud = 9600, quot = 0; > unsigned int cval = 0; > int cflag = CREAD | HUPCL | CLOCAL | B9600 | CS8; > - const struct old_serial_port *ser = rs_table + index; > + struct old_serial_port *ser = rs_table + index; > int err; > > + /* Initialize baud_base firstly, BASE_BAUD may not be constant */ > + ser->baud_base = BASE_BAUD; > + > /* Divisor, bytesize and parity */ > quot = ser->baud_base / baud; > cval = cflag & (CSIZE | CSTOPB); > diff --git a/drivers/staging/speakup/serialio.h > b/drivers/staging/speakup/serialio.h > index 55d68b5..e1e9152 100644 > --- a/drivers/staging/speakup/serialio.h > +++ b/drivers/staging/speakup/serialio.h > @@ -52,11 +52,11 @@ struct old_serial_port { > #endif > #ifndef SERIAL_PORT_DFNS > #define SERIAL_PORT_DFNS \ > - /* UART CLK PORT IRQ FLAGS*/ \ > - { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ > - { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \ > - { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \ > - { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */ > + /* UART CLK PORT IRQ FLAGS*/ \ > + { 0, 0 /* delay init */, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ > + { 0, 0 /* delay init */, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \ > + { 0, 0 /* delay init */, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \ > + { 0, 0 /* delay init */, 0x2E8, 3, STD_COM4_FLAGS },/* ttyS3 */ No, just use the platform-specific SERIAL_PORT_DNFS, instead of having a copy of it here in this driver, which is just wrong. So please remove this, and just rely on the system version of this, defining it to "nothing" if it isn't present, like the 8250 serial driver does it. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel