Re: [greybus-dev] [PATCH v2] staging: greybus: loopback_test: fix comment style issues
On Tue, Jul 04, 2017 at 11:47:51AM +0530, Viresh Kumar wrote: > + Greg > > On 03-07-17, 23:27, Aleksey Rybalkin wrote: > > According to checkpatch warning, block comments should align the * on > > each line. Also, preferred style for multi-line comments is starting the > > comment text after the second *. > > > > Signed-off-by: Aleksey Rybalkin > > --- Thanks for the v2. Next time remember to include a short changelog here after the cut-off line. > > drivers/staging/greybus/tools/loopback_test.c | 13 +++-- > > 1 file changed, 7 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/staging/greybus/tools/loopback_test.c > > b/drivers/staging/greybus/tools/loopback_test.c > > index 32a43693181c..d86bcce53e6b 100644 > > --- a/drivers/staging/greybus/tools/loopback_test.c > > +++ b/drivers/staging/greybus/tools/loopback_test.c > > @@ -528,11 +528,11 @@ static int log_results(struct loopback_test *t) > > tm = *localtime(&local_time); > > > > /* > > - * file name will test_name_size_iteration_max.csv > > - * every time the same test with the same parameters is run we will then > > - * append to the same CSV with datestamp - representing each test > > - * dataset. > > - */ > > +* file name will test_name_size_iteration_max.csv > > +* every time the same test with the same parameters is run we will then > > +* append to the same CSV with datestamp - representing each test > > +* dataset. > > +*/ > > if (t->file_output && !t->porcelain) { > > snprintf(file_name, sizeof(file_name), "%s_%d_%d.csv", > > t->test_name, t->size, t->iteration_max); > > @@ -779,7 +779,8 @@ static void prepare_devices(struct loopback_test *t) > > { > > int i; > > > > - /* Cancel any running tests on enabled devices. If > > + /* > > +* Cancel any running tests on enabled devices. If > > * stop_all option is given, stop test on all devices. > > */ > > for (i = 0; i < t->device_count; i++) > > Reviewed-by: Viresh Kumar Acked-by: Johan Hovold Thanks, Johan ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: comedi: Use offset_in_page macro
On 04/07/17 00:13, Amitoj Kaur Chawla wrote: Use offset_in_page macro instead of (var & ~PAGE_MASK) The Coccinelle semantic patch used to make this change is as follows: // @@ unsigned long p; @@ - p & ~PAGE_MASK + offset_in_page(p) // Signed-off-by: Amitoj Kaur Chawla --- drivers/staging/comedi/comedi_buf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/comedi_buf.c b/drivers/staging/comedi/comedi_buf.c index 8e9b30b..b455ff6 100644 --- a/drivers/staging/comedi/comedi_buf.c +++ b/drivers/staging/comedi/comedi_buf.c @@ -165,7 +165,7 @@ int comedi_buf_map_put(struct comedi_buf_map *bm) int comedi_buf_map_access(struct comedi_buf_map *bm, unsigned long offset, void *buf, int len, int write) { - unsigned int pgoff = offset & ~PAGE_MASK; + unsigned int pgoff = offset_in_page(offset); unsigned long pg = offset >> PAGE_SHIFT; int done = 0; Seems reasonable, thanks. Being picky, I'd prefer it if the line `#include ` was added, since that is where the `offset_in_page` macro is defined. But it doesn't matter that much as the "mm.h" header file gets included indirectly, and there are plenty of examples where `offset_in_page` is used without including directly. Signed-off-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 7/7] Staging: rtl8712 : rtl871x_io.c:fix coding style of kmalloc usage
CHECK: multiple assignments should be avoided CHECK: Prefer kmalloc(sizeof(*pintf_hdl->pintfpriv)...) over kmalloc(sizeof(struct intf_priv)...) Signed-off-by: Jaya Durga --- drivers/staging/rtl8712/rtl871x_io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rtl8712/rtl871x_io.c b/drivers/staging/rtl8712/rtl871x_io.c index 3a10940..b8b47c4 100644 --- a/drivers/staging/rtl8712/rtl871x_io.c +++ b/drivers/staging/rtl8712/rtl871x_io.c @@ -60,8 +60,9 @@ static uint _init_intf_hdl(struct _adapter *padapter, set_intf_funs = &(r8712_usb_set_intf_funs); set_intf_ops = &r8712_usb_set_intf_ops; init_intf_priv = &r8712_usb_init_intf_priv; - pintf_priv = pintf_hdl->pintfpriv = kmalloc(sizeof(struct intf_priv), + pintf_hdl->pintfpriv = kmalloc(sizeof(*pintf_hdl->pintfpriv), GFP_ATOMIC); + pintf_priv = pintf_hdl->pintfpriv; if (pintf_priv == NULL) goto _init_intf_hdl_fail; pintf_hdl->adapter = (u8 *)padapter; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] rtl8723bs: fix build when DEBUG_RTL871X is defined
Stefan Assmann writes: > Defining DEBUG_RTL871X in rtw_debug.h causes the following compile error: > CC [M] drivers/staging/rtl8723bs/core/rtw_mlme.o > In file included from drivers/staging/rtl8723bs/core/rtw_mlme.c:18:0: > drivers/staging/rtl8723bs/core/rtw_mlme.c: In function ‘rtw_restruct_sec_ie’: > drivers/staging/rtl8723bs/core/rtw_mlme.c:2502:19: error: ‘ndissecuritytype’ > undeclared (first use in thisfunction) > > Remove the no longer existing parameter. > > Signed-off-by: Stefan Assmann Please use prefix "staging:" for staging patches. -- Kalle Valo ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] rtl8723bs: fix build when DEBUG_RTL871X is defined
On 04.07.2017 13:01, Kalle Valo wrote: > Stefan Assmann writes: > >> Defining DEBUG_RTL871X in rtw_debug.h causes the following compile error: >> CC [M] drivers/staging/rtl8723bs/core/rtw_mlme.o >> In file included from drivers/staging/rtl8723bs/core/rtw_mlme.c:18:0: >> drivers/staging/rtl8723bs/core/rtw_mlme.c: In function ‘rtw_restruct_sec_ie’: >> drivers/staging/rtl8723bs/core/rtw_mlme.c:2502:19: error: ‘ndissecuritytype’ >> undeclared (first use in thisfunction) >> >> Remove the no longer existing parameter. >> >> Signed-off-by: Stefan Assmann > > Please use prefix "staging:" for staging patches. > OK, will keep that in mind next time. Thanks! Stefan ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] drivers/staging/media/atomisp/i2c/gc2235: fix sparse warning: missing static
Several local use structs were missing declarations. Added static qualifier to clean up Sparse warning. Signed-off-by: Guillermo O. Freschi --- drivers/staging/media/atomisp/i2c/gc2235.c | 2 +- drivers/staging/media/atomisp/i2c/gc2235.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/media/atomisp/i2c/gc2235.c b/drivers/staging/media/atomisp/i2c/gc2235.c index 50f431729b6c..04e69dd5fdb1 100644 --- a/drivers/staging/media/atomisp/i2c/gc2235.c +++ b/drivers/staging/media/atomisp/i2c/gc2235.c @@ -480,7 +480,7 @@ static const struct v4l2_ctrl_ops ctrl_ops = { .g_volatile_ctrl = gc2235_g_volatile_ctrl }; -struct v4l2_ctrl_config gc2235_controls[] = { +static struct v4l2_ctrl_config gc2235_controls[] = { { .ops = &ctrl_ops, .id = V4L2_CID_EXPOSURE_ABSOLUTE, diff --git a/drivers/staging/media/atomisp/i2c/gc2235.h b/drivers/staging/media/atomisp/i2c/gc2235.h index ccbc757045a5..ae8f09dbe5c7 100644 --- a/drivers/staging/media/atomisp/i2c/gc2235.h +++ b/drivers/staging/media/atomisp/i2c/gc2235.h @@ -530,7 +530,7 @@ static struct gc2235_reg const gc2235_1616_1216_30fps[] = { { GC2235_TOK_TERM, 0, 0 } }; -struct gc2235_resolution gc2235_res_preview[] = { +static struct gc2235_resolution gc2235_res_preview[] = { { .desc = "gc2235_1600_900_30fps", @@ -582,7 +582,7 @@ struct gc2235_resolution gc2235_res_preview[] = { }; #define N_RES_PREVIEW (ARRAY_SIZE(gc2235_res_preview)) -struct gc2235_resolution gc2235_res_still[] = { +static struct gc2235_resolution gc2235_res_still[] = { { .desc = "gc2235_1600_900_30fps", .width = 1600, @@ -632,7 +632,7 @@ struct gc2235_resolution gc2235_res_still[] = { }; #define N_RES_STILL (ARRAY_SIZE(gc2235_res_still)) -struct gc2235_resolution gc2235_res_video[] = { +static struct gc2235_resolution gc2235_res_video[] = { { .desc = "gc2235_1296_736_30fps", .width = 1296, -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] hv: fix msi affinity when device requests all possible CPU's
On Sun, 2 Jul 2017 16:38:19 -0500 Bjorn Helgaas wrote: > On Wed, Jun 28, 2017 at 04:22:04PM -0700, Stephen Hemminger wrote: > > When Intel 10G (ixgbevf) is passed to a Hyper-V guest with SR-IOV, > > the driver requests affinity with all possible CPU's (0-239) even > > those CPU's are not online (and will never be). Because of this the device > > is unable to correctly get MSI interrupt's setup. > > > > This was caused by the change in 4.12 that converted this affinity > > into all possible CPU's (0-31) but then host reports > > an error since this is larger than the number of online cpu's. > > > > Previously, this worked (up to 4.12-rc1) because only online cpu's > > would be put in mask passed to the host. > > > > This patch applies only to 4.12. > > The driver in linux-next needs a a different fix because of the changes > > to PCI host protocol version. > > If Linus decides to postpone v4.12 a week, I can ask him to pull this. But > I suspect he will release v4.12 today. In that case, I don't know what to > do with this other than maybe send it to Greg for a -stable release. Looks like this will have to be queued for 4.12 stable. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging: android/ion: fix sparse warnings
ion_carveout_heap.c:115:17: warning: symbol 'ion_carveout_heap_create' \ was not declared. Should it be static? ion_chunk_heap.c:120:17: warning: symbol 'ion_chunk_heap_create' \ was not declared. Should it be static? ion_cma_heap.c:109:5: warning: symbol '__ion_add_cma_heaps' \ was not declared. Should it be static? Signed-off-by: Joseph Wright --- drivers/staging/android/ion/ion.h | 4 drivers/staging/android/ion/ion_cma_heap.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/staging/android/ion/ion.h b/drivers/staging/android/ion/ion.h index fa9ed81..fda1e91 100644 --- a/drivers/staging/android/ion/ion.h +++ b/drivers/staging/android/ion/ion.h @@ -358,4 +358,8 @@ long ion_ioctl(struct file *filp, unsigned int cmd, unsigned long arg); int ion_query_heaps(struct ion_heap_query *query); +struct ion_heap *ion_chunk_heap_create(struct ion_platform_heap *heap_data); + +struct ion_heap *ion_carveout_heap_create(struct ion_platform_heap *heap_data); + #endif /* _ION_H */ diff --git a/drivers/staging/android/ion/ion_cma_heap.c b/drivers/staging/android/ion/ion_cma_heap.c index a0949bc..c6db9b7 100644 --- a/drivers/staging/android/ion/ion_cma_heap.c +++ b/drivers/staging/android/ion/ion_cma_heap.c @@ -106,7 +106,7 @@ static struct ion_heap *__ion_cma_heap_create(struct cma *cma) return &cma_heap->heap; } -int __ion_add_cma_heaps(struct cma *cma, void *data) +static int __ion_add_cma_heaps(struct cma *cma, void *data) { struct ion_heap *heap; -- 2.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [greybus-dev] [PATCH v2] staging: greybus: loopback_test: fix comment style issues
On Tue, Jul 04, 2017 at 10:28:10AM +0200, Johan Hovold wrote: > On Tue, Jul 04, 2017 at 11:47:51AM +0530, Viresh Kumar wrote: > > + Greg > > > > On 03-07-17, 23:27, Aleksey Rybalkin wrote: > > > According to checkpatch warning, block comments should align the * on > > > each line. Also, preferred style for multi-line comments is starting the > > > comment text after the second *. > > > > > > Signed-off-by: Aleksey Rybalkin > > > --- > > Thanks for the v2. Next time remember to include a short changelog here > after the cut-off line. Will do next time. And will send more meaningful patches, too. This was "learning the ropes" patch. Thanks for the feedback. Also a question - is it ok to send "thanks for the feedback" emails with minimum substance like this one? I was hesitating for a minute to send it. > > > drivers/staging/greybus/tools/loopback_test.c | 13 +++-- > > > 1 file changed, 7 insertions(+), 6 deletions(-) > > > > > > diff --git a/drivers/staging/greybus/tools/loopback_test.c > > > b/drivers/staging/greybus/tools/loopback_test.c > > > index 32a43693181c..d86bcce53e6b 100644 > > > --- a/drivers/staging/greybus/tools/loopback_test.c > > > +++ b/drivers/staging/greybus/tools/loopback_test.c > > > @@ -528,11 +528,11 @@ static int log_results(struct loopback_test *t) > > > tm = *localtime(&local_time); > > > > > > /* > > > - * file name will test_name_size_iteration_max.csv > > > - * every time the same test with the same parameters is run we will then > > > - * append to the same CSV with datestamp - representing each test > > > - * dataset. > > > - */ > > > + * file name will test_name_size_iteration_max.csv > > > + * every time the same test with the same parameters is run we will then > > > + * append to the same CSV with datestamp - representing each test > > > + * dataset. > > > + */ > > > if (t->file_output && !t->porcelain) { > > > snprintf(file_name, sizeof(file_name), "%s_%d_%d.csv", > > > t->test_name, t->size, t->iteration_max); > > > @@ -779,7 +779,8 @@ static void prepare_devices(struct loopback_test *t) > > > { > > > int i; > > > > > > - /* Cancel any running tests on enabled devices. If > > > + /* > > > + * Cancel any running tests on enabled devices. If > > >* stop_all option is given, stop test on all devices. > > >*/ > > > for (i = 0; i < t->device_count; i++) > > > > Reviewed-by: Viresh Kumar > > Acked-by: Johan Hovold > > Thanks, > Johan > signature.asc Description: PGP signature ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel