[PATCH] Staging: dgnc: replace printk
From: Matteo Semenzato This patch fixes the following warning: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... Signed-off-by: Matteo Semenzato --- drivers/staging/dgnc/dgnc_sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_sysfs.c b/drivers/staging/dgnc/dgnc_sysfs.c index 2fd34ca..0fa2388 100644 --- a/drivers/staging/dgnc/dgnc_sysfs.c +++ b/drivers/staging/dgnc/dgnc_sysfs.c @@ -91,7 +91,7 @@ void dgnc_create_driver_sysfiles(struct pci_driver *dgnc_driver) rc |= driver_create_file(driverfs, &driver_attr_maxboards); rc |= driver_create_file(driverfs, &driver_attr_pollrate); if (rc) - printk(KERN_ERR "DGNC: sysfs driver_create_file failed!\n"); + pr_err("DGNC: sysfs driver_create_file failed!\n"); } @@ -360,7 +360,7 @@ void dgnc_create_ports_sysfiles(struct dgnc_board *bd) rc |= device_create_file(&(bd->pdev->dev), &dev_attr_vpd); rc |= device_create_file(&(bd->pdev->dev), &dev_attr_serial_number); if (rc) - printk(KERN_ERR "DGNC: sysfs device_create_file failed!\n"); + pr_err("DGNC: sysfs device_create_file failed!\n"); } -- 2.3.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging: dgnc: replace EXTRA_CFLAGS
From: Matteo Semenzato This patch fixes the following warning: Use of EXTRA_CFLAGS is deprecated, please use `ccflags-y instead. Signed-off-by: Matteo Semenzato --- drivers/staging/dgnc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/dgnc/Makefile b/drivers/staging/dgnc/Makefile index b69f7b6..d70323e 100644 --- a/drivers/staging/dgnc/Makefile +++ b/drivers/staging/dgnc/Makefile @@ -1,4 +1,4 @@ -EXTRA_CFLAGS += -DDG_NAME=\"dgnc-1.3-16\" -DDG_PART=\"40002369_F\" +ccflags-y += -DDG_NAME=\"dgnc-1.3-16\" -DDG_PART=\"40002369_F\" obj-$(CONFIG_DGNC) += dgnc.o -- 2.3.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: dgnc: replace EXTRA_CFLAGS
On Sun, Mar 01, 2015 at 09:41:26AM +0100, Matteo Semenzato wrote: > From: Matteo Semenzato > > This patch fixes the following warning: > Use of EXTRA_CFLAGS is deprecated, please use `ccflags-y instead. > > Signed-off-by: Matteo Semenzato > --- > drivers/staging/dgnc/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/dgnc/Makefile b/drivers/staging/dgnc/Makefile > index b69f7b6..d70323e 100644 > --- a/drivers/staging/dgnc/Makefile > +++ b/drivers/staging/dgnc/Makefile > @@ -1,4 +1,4 @@ > -EXTRA_CFLAGS += -DDG_NAME=\"dgnc-1.3-16\" -DDG_PART=\"40002369_F\" > +ccflags-y += -DDG_NAME=\"dgnc-1.3-16\" -DDG_PART=\"40002369_F\" Please fix the code to not need these flags at all. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: dgnc: replace printk
On Sun, Mar 01, 2015 at 09:31:41AM +0100, Matteo Semenzato wrote: > From: Matteo Semenzato > > This patch fixes the following warning: > Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, > ... then pr_err(... to printk(KERN_ERR ... > > Signed-off-by: Matteo Semenzato > --- > drivers/staging/dgnc/dgnc_sysfs.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/dgnc/dgnc_sysfs.c > b/drivers/staging/dgnc/dgnc_sysfs.c > index 2fd34ca..0fa2388 100644 > --- a/drivers/staging/dgnc/dgnc_sysfs.c > +++ b/drivers/staging/dgnc/dgnc_sysfs.c > @@ -91,7 +91,7 @@ void dgnc_create_driver_sysfiles(struct pci_driver > *dgnc_driver) > rc |= driver_create_file(driverfs, &driver_attr_maxboards); > rc |= driver_create_file(driverfs, &driver_attr_pollrate); > if (rc) > - printk(KERN_ERR "DGNC: sysfs driver_create_file failed!\n"); > + pr_err("DGNC: sysfs driver_create_file failed!\n"); > } > > > @@ -360,7 +360,7 @@ void dgnc_create_ports_sysfiles(struct dgnc_board *bd) > rc |= device_create_file(&(bd->pdev->dev), &dev_attr_vpd); > rc |= device_create_file(&(bd->pdev->dev), &dev_attr_serial_number); > if (rc) > - printk(KERN_ERR "DGNC: sysfs device_create_file failed!\n"); > + pr_err("DGNC: sysfs device_create_file failed!\n"); Why can't you use dev_err() here? ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH V2] Staging: dgnc: replace EXTRA_CFLAGS
From: Matteo Semenzato This patch removes EXTRA_CFLAGS from the Makefile and defines DDG_PART in dgnc_driver.h Signed-off-by: Matteo Semenzato --- drivers/staging/dgnc/Makefile | 2 -- drivers/staging/dgnc/dgnc_driver.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/dgnc/Makefile b/drivers/staging/dgnc/Makefile index b69f7b6..995c874 100644 --- a/drivers/staging/dgnc/Makefile +++ b/drivers/staging/dgnc/Makefile @@ -1,5 +1,3 @@ -EXTRA_CFLAGS += -DDG_NAME=\"dgnc-1.3-16\" -DDG_PART=\"40002369_F\" - obj-$(CONFIG_DGNC) += dgnc.o dgnc-objs := dgnc_cls.o dgnc_driver.o\ diff --git a/drivers/staging/dgnc/dgnc_driver.h b/drivers/staging/dgnc/dgnc_driver.h index a8157eb..0b718a8 100644 --- a/drivers/staging/dgnc/dgnc_driver.h +++ b/drivers/staging/dgnc/dgnc_driver.h @@ -46,6 +46,7 @@ #definePROCSTR "dgnc" /* /proc entries */ #defineDEVSTR "/dev/dg/dgnc" /* /dev entries */ #defineDRVSTR "dgnc" /* Driver name string */ +#define DG_PART"40002369_F" #define TRC_TO_CONSOLE 1 -- 2.3.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH V2] Staging: dgnc: replace EXTRA_CFLAGS
On Sun, Mar 01, 2015 at 06:19:57PM +0100, Matteo Semenzato wrote: > From: Matteo Semenzato > > This patch removes EXTRA_CFLAGS from the Makefile and defines DDG_PART > in dgnc_driver.h > > Signed-off-by: Matteo Semenzato > --- > drivers/staging/dgnc/Makefile | 2 -- > drivers/staging/dgnc/dgnc_driver.h | 1 + > 2 files changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/staging/dgnc/Makefile b/drivers/staging/dgnc/Makefile > index b69f7b6..995c874 100644 > --- a/drivers/staging/dgnc/Makefile > +++ b/drivers/staging/dgnc/Makefile > @@ -1,5 +1,3 @@ > -EXTRA_CFLAGS += -DDG_NAME=\"dgnc-1.3-16\" -DDG_PART=\"40002369_F\" > - > obj-$(CONFIG_DGNC) += dgnc.o > > dgnc-objs := dgnc_cls.o dgnc_driver.o\ > diff --git a/drivers/staging/dgnc/dgnc_driver.h > b/drivers/staging/dgnc/dgnc_driver.h > index a8157eb..0b718a8 100644 > --- a/drivers/staging/dgnc/dgnc_driver.h > +++ b/drivers/staging/dgnc/dgnc_driver.h > @@ -46,6 +46,7 @@ > #define PROCSTR "dgnc" /* /proc entries > */ > #define DEVSTR "/dev/dg/dgnc" /* /dev entries > */ > #define DRVSTR "dgnc" /* Driver name string > */ > +#define DG_PART "40002369_F" Why do we need this define? And why doesn't it use the same formatting as the other ones in this list? ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2] android: binder: fix binder mmap failures
On 27 February 2015 at 23:14, Andrey Ryabinin wrote: > binder_update_page_range() initializes only addr and size > fields in 'struct vm_struct tmp_area;' and passes it to > map_vm_area(). > > Before 71394fe50146 ("mm: vmalloc: add flag preventing guard hole allocation") > this was because map_vm_area() didn't use any other fields > in vm_struct except addr and size. > > Now get_vm_area_size() (used in map_vm_area()) reads vm_struct's > flags to determine whether vm area has guard hole or not. > > binder_update_page_range() don't initialize flags field, so > this causes following binder mmap failures: > ---[ cut here ] > WARNING: CPU: 0 PID: 1971 at mm/vmalloc.c:130 > vmap_page_range_noflush+0x119/0x144() > CPU: 0 PID: 1971 Comm: healthd Not tainted 4.0.0-rc1-00399-g7da3fdc-dirty #157 > Hardware name: ARM-Versatile Express > [] (unwind_backtrace) from [] (show_stack+0x11/0x14) > [] (show_stack) from [] (dump_stack+0x59/0x7c) > [] (dump_stack) from [] (warn_slowpath_common+0x55/0x84) > [] (warn_slowpath_common) from [] > (warn_slowpath_null+0x17/0x1c) > [] (warn_slowpath_null) from [] > (vmap_page_range_noflush+0x119/0x144) > [] (vmap_page_range_noflush) from [] > (map_vm_area+0x27/0x48) > [] (map_vm_area) from [] > (binder_update_page_range+0x12f/0x27c) > [] (binder_update_page_range) from [] > (binder_mmap+0xbf/0x1ac) > [] (binder_mmap) from [] (mmap_region+0x2eb/0x4d4) > [] (mmap_region) from [] (do_mmap_pgoff+0x1e7/0x250) > [] (do_mmap_pgoff) from [] (vm_mmap_pgoff+0x45/0x60) > [] (vm_mmap_pgoff) from [] (SyS_mmap_pgoff+0x5d/0x80) > [] (SyS_mmap_pgoff) from [] (ret_fast_syscall+0x1/0x5c) > ---[ end trace 48c2c4b9a1349e54 ]--- > binder: 1982: binder_alloc_buf failed to map page at f0e0 in kernel > binder: binder_mmap: 1982 b6bde000-b6cdc000 alloc small buf failed -12 > > Use map_kernel_range_noflush() instead of map_vm_area() as this is better > API for binder's purposes and it allows to get rid of 'vm_struct tmp_area' at > all. > > Fixes: 71394fe50146 ("mm: vmalloc: add flag preventing guard hole allocation") > Signed-off-by: Andrey Ryabinin > Reported-by: Amit Pundir > --- > Changes since v1: >- fixed ret check after map_kernel_ranges_noflush(). > > drivers/android/binder.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/android/binder.c b/drivers/android/binder.c > index 33b09b6..6607f3c 100644 > --- a/drivers/android/binder.c > +++ b/drivers/android/binder.c > @@ -551,7 +551,6 @@ static int binder_update_page_range(struct binder_proc > *proc, int allocate, > { > void *page_addr; > unsigned long user_page_addr; > - struct vm_struct tmp_area; > struct page **page; > struct mm_struct *mm; > > @@ -600,10 +599,11 @@ static int binder_update_page_range(struct binder_proc > *proc, int allocate, > proc->pid, page_addr); > goto err_alloc_page_failed; > } > - tmp_area.addr = page_addr; > - tmp_area.size = PAGE_SIZE + PAGE_SIZE /* guard page? */; > - ret = map_vm_area(&tmp_area, PAGE_KERNEL, page); > - if (ret) { > + ret = map_kernel_range_noflush((unsigned long)page_addr, > + PAGE_SIZE, PAGE_KERNEL, page); > + flush_cache_vmap((unsigned long)page_addr, > + (unsigned long)page_addr + PAGE_SIZE); > + if (ret != 1) { > pr_err("%d: binder_alloc_buf failed to map page at %p > in kernel\n", >proc->pid, page_addr); > goto err_map_kernel_failed; > -- Works for me. Thanks. Tested-by: Amit Pundir > 2.3.0 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: dgnc: fix braces {} are not necessary for single statement blocks
This patch fixes the following checkpatch.pl warning: braces {} are not necessary for single statement blocks Signed-off-by: Salah Triki --- drivers/staging/dgnc/dgnc_tty.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c index f81a375..8179342 100644 --- a/drivers/staging/dgnc/dgnc_tty.c +++ b/drivers/staging/dgnc/dgnc_tty.c @@ -886,10 +886,6 @@ void dgnc_check_queue_flow_control(struct channel_t *ch) ch->ch_stops_sent++; } } - /* No FLOW */ - else { - /* Empty... Can't do anything about the impending overflow... */ - } } /* -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: dgnc: Remove unnecessary checks
This patch removes unnecessary checks of unit magic, channel magic, board magic and board state. Signed-off-by: Salah Triki --- drivers/staging/dgnc/dgnc_sysfs.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_sysfs.c b/drivers/staging/dgnc/dgnc_sysfs.c index 2fd34ca..f420590 100644 --- a/drivers/staging/dgnc/dgnc_sysfs.c +++ b/drivers/staging/dgnc/dgnc_sysfs.c @@ -384,23 +384,9 @@ void dgnc_remove_ports_sysfiles(struct dgnc_board *bd) static ssize_t dgnc_tty_state_show(struct device *d, struct device_attribute *attr, char *buf) { - struct dgnc_board *bd; - struct channel_t *ch; struct un_t *un; - if (!d) - return 0; un = dev_get_drvdata(d); - if (!un || un->magic != DGNC_UNIT_MAGIC) - return 0; - ch = un->un_ch; - if (!ch || ch->magic != DGNC_CHANNEL_MAGIC) - return 0; - bd = ch->ch_bd; - if (!bd || bd->magic != DGNC_BOARD_MAGIC) - return 0; - if (bd->state != BOARD_READY) - return 0; return snprintf(buf, PAGE_SIZE, "%s", un->un_open_count ? "Open" : "Closed"); } -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: dgnc: Remove unnecessary checks
On Mon, Mar 02, 2015 at 12:38:35AM +0100, Salah Triki wrote: > This patch removes unnecessary checks of unit magic, channel magic, board > magic and board state. > > Signed-off-by: Salah Triki > --- > drivers/staging/dgnc/dgnc_sysfs.c | 14 -- > 1 file changed, 14 deletions(-) > > diff --git a/drivers/staging/dgnc/dgnc_sysfs.c > b/drivers/staging/dgnc/dgnc_sysfs.c > index 2fd34ca..f420590 100644 > --- a/drivers/staging/dgnc/dgnc_sysfs.c > +++ b/drivers/staging/dgnc/dgnc_sysfs.c > @@ -384,23 +384,9 @@ void dgnc_remove_ports_sysfiles(struct dgnc_board *bd) > > static ssize_t dgnc_tty_state_show(struct device *d, struct device_attribute > *attr, char *buf) > { > - struct dgnc_board *bd; > - struct channel_t *ch; > struct un_t *un; > > - if (!d) > - return 0; > un = dev_get_drvdata(d); > - if (!un || un->magic != DGNC_UNIT_MAGIC) > - return 0; > - ch = un->un_ch; > - if (!ch || ch->magic != DGNC_CHANNEL_MAGIC) > - return 0; > - bd = ch->ch_bd; > - if (!bd || bd->magic != DGNC_BOARD_MAGIC) > - return 0; > - if (bd->state != BOARD_READY) > - return 0; > > return snprintf(buf, PAGE_SIZE, "%s", un->un_open_count ? "Open" : > "Closed"); Why do we have this sysfs file at all? It's not useful for anything, and userspace better not depend on learning if a tty port is "open" or "closed" :) Care to just remove it entirely? thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: fbtft: fix space prohibition
On Sat, Feb 21, 2015 at 09:36:49PM +0100, Matteo Semenzato wrote: > From: Matteo Semenzato > > This patch fixes the following warnings: > space prohibited before that close parenthesis ')' > space prohibited after that open parenthesis '(' > > Signed-off-by: Matteo Semenzato > --- > drivers/staging/fbtft/fb_bd663474.c | 100 > ++-- Doesn't apply to my tree :( ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: fbtft: fix space errors
On Mon, Feb 23, 2015 at 05:24:51PM +0100, Matteo Semenzato wrote: > From: Matteo Semenzato > > This patch fixes the following error: > space prohibited before that ',' > > Signed-off-by: Matteo Semenzato > --- > drivers/staging/fbtft/fb_ra8875.c | 150 > +++--- > 1 file changed, 75 insertions(+), 75 deletions(-) Also doesn't apply :( Please fix up all of your pending patches for this driver and resend, something is really out of sync here... ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: fbtft: fix whitespace errors
On Mon, Feb 23, 2015 at 07:20:30AM +0100, Matteo Semenzato wrote: > From: Matteo Semenzato > > This patch fixes the following errors: > ERROR: space required after that ',' > ERROR: trailing whitespace > > Signed-off-by: Matteo Semenzato > --- > drivers/staging/fbtft/fb_st7735r.c | 18 +- > 1 file changed, 9 insertions(+), 9 deletions(-) Doesn't apply to my tree :( ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH V2] Staging: fbtft: fix coding style errors
On Sat, Feb 28, 2015 at 06:37:30PM +0100, Matteo Semenzato wrote: > From: Matteo Semenzato > > This patch fixes the following error: > space required after that ';' > > Signed-off-by: Matteo Semenzato > --- > drivers/staging/fbtft/fbtft_device.c | 145 > +++ > 1 file changed, 111 insertions(+), 34 deletions(-) You have to say what the difference between this one, and v1, otherwise I'll just guess and say it is broken and throw away both of them :( Please fix and resend. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: fbtft: fix indent
On Sat, Feb 28, 2015 at 03:51:47PM +0100, Matteo Semenzato wrote: > From: Matteo Semenzato > > This patch fixes the following error: > code indent should use tabs where possible > > Signed-off-by: Matteo Semenzato > --- > drivers/staging/fbtft/flexfb.c | 9 + > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/drivers/staging/fbtft/flexfb.c b/drivers/staging/fbtft/flexfb.c > index 90832c3..9a96c7c 100644 > --- a/drivers/staging/fbtft/flexfb.c > +++ b/drivers/staging/fbtft/flexfb.c > @@ -127,10 +127,11 @@ static int ili9341_init[] = { \ > > -1,0xC5,0x35,0x3E,-1,0xC7,0xBE,-1,0xB1,0x00,0x1B,-1,0xB6,0x0a,0x82,0x27,0x00,-1,0xB7,0x07, > \ > -1,0x3A,0x55,-1,0x36,0x48,-1,0x11,-2,120,-1,0x29,-2,20,-3 }; > > -static int ssd1351_init[] = { > -1,0xfd,0x12,-1,0xfd,0xb1,-1,0xae,-1,0xb3,0xf1,-1,0xca,0x7f,-1,0xa0,0x74, \ > - > -1,0x15,0x00,0x7f,-1,0x75,0x00,0x7f,-1,0xa1,0x00,-1,0xa2,0x00,-1,0xb5,0x00, \ > - > -1,0xab,0x01,-1,0xb1,0x32,-1,0xb4,0xa0,0xb5,0x55,-1,0xbb,0x17,-1,0xbe,0x05, \ > - > -1,0xc1,0xc8,0x80,0xc8,-1,0xc7,0x0f,-1,0xb6,0x01,-1,0xa6,-1,0xaf,-3 }; > +static int ssd1351_init[] = { > +-1,0xfd,0x12,-1,0xfd,0xb1,-1,0xae,-1,0xb3,0xf1,-1,0xca,0x7f,-1,0xa0,0x74, \ > +-1,0x15,0x00,0x7f,-1,0x75,0x00,0x7f,-1,0xa1,0x00,-1,0xa2,0x00,-1,0xb5,0x00, \ > +-1,0xab,0x01,-1,0xb1,0x32,-1,0xb4,0xa0,0xb5,0x55,-1,0xbb,0x17,-1,0xbe,0x05, \ > +-1,0xc1,0xc8,0x80,0xc8,-1,0xc7,0x0f,-1,0xb6,0x01,-1,0xa6,-1,0xaf,-3 }; Ick, please indent and add spaces properly. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: fbtft: use %zu to avoid compile warning
On Fri, Feb 27, 2015 at 03:08:58AM +, Sheng Yong wrote: > For value which has size_t type, use %zu to avoid compile warning of > printk format. > > Signed-off-by: Sheng Yong > --- > drivers/staging/fbtft/fbtft-core.c | 2 +- > drivers/staging/fbtft/fbtft-io.c | 4 ++-- > 2 files changed, 3 insertions(+), 3 deletions(-) Someone else sent this patch before you did, sorry. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/1] Staging: fbtft: fb_ssd1331: replaced C99 comments with C89
On Fri, Feb 27, 2015 at 09:44:42PM -0800, Tolga Ceylan wrote: > Replaced C99 '//' comments with C89 '/**/' > > Signed-off-by: Tolga Ceylan > --- > drivers/staging/fbtft/fb_ssd1331.c | 30 +++--- > 1 file changed, 15 insertions(+), 15 deletions(-) Doesn't apply to my tree :( ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/1] Staging: fbtft: fbtft-core: removed space before ','
On Fri, Feb 27, 2015 at 09:06:56PM -0800, Tolga Ceylan wrote: > Removed space before ',' > > Signed-off-by: Tolga Ceylan > --- > drivers/staging/fbtft/fbtft-core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/fbtft/fbtft-core.c > b/drivers/staging/fbtft/fbtft-core.c > index 37dcf7e..ac4287f 100644 > --- a/drivers/staging/fbtft/fbtft-core.c > +++ b/drivers/staging/fbtft/fbtft-core.c > @@ -49,7 +49,7 @@ extern int fbtft_gamma_parse_str(struct fbtft_par *par, > unsigned long *curves, > const char *str, int size); > > static unsigned long debug; > -module_param(debug, ulong , 0); > +module_param(debug, ulong, 0); > MODULE_PARM_DESC(debug, "override device debug level"); > > static bool dma = true; Someone else already made this change, sorry :( ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 03/27] staging: lustre: Convert uses of "int rc = seq_printf(...)"
On Sat, Feb 21, 2015 at 06:53:30PM -0800, Joe Perches wrote: > The seq_printf return value, because it's frequently misused, > will eventually be converted to void. > > See: commit 1f33c41c03da ("seq_file: Rename seq_overflow() to > seq_has_overflowed() and make public") > > Convert these uses to: > > seq_printf(seq, ...); > > return 0; > > Done via cocci script: > > @@ > struct seq_file *seq; > int i; > @@ > - i = seq_printf(seq, > + seq_printf(seq, > ...); > ... > - return i; > + return 0; > > @@ > struct seq_file *seq; > int i; > @@ > - i = 0; > - i += seq_printf(seq, > + seq_printf(seq, > ...); > ... > - return i; > + return 0; > > With some additional reformatting and typing post conversion > to remove the now unnecessary "int i;" declaration. > > Signed-off-by: Joe Perches > Cc: Oleg Drokin > Cc: Andreas Dilger > Signed-off-by: Andrew Morton > --- > drivers/staging/lustre/lustre/fid/lproc_fid.c | 23 +++--- > drivers/staging/lustre/lustre/llite/lproc_llite.c | 5 +- > drivers/staging/lustre/lustre/mdc/lproc_mdc.c | 6 +- > drivers/staging/lustre/lustre/osc/lproc_osc.c | 45 ++-- > .../staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c| 5 +- > drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c| 82 > +++--- > 6 files changed, 79 insertions(+), 87 deletions(-) This patch fails to apply to my tree anymore :( Can you refresh it against the staging-testing branch of staging.git and resend? thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging:lustre:libcfs: Merge linux-proc.c into module.c
On Tue, Feb 10, 2015 at 07:24:40PM +0800, Matt Tyler wrote: > module.c was previously the sole exporter of symbols from module.c > This patch removes the global symbols by merging the two files. > > Signed-off-by: Matthew Tyler > --- > drivers/staging/lustre/lustre/libcfs/Makefile | 2 +- > .../lustre/lustre/libcfs/linux/linux-proc.c| 577 > - > drivers/staging/lustre/lustre/libcfs/module.c | 546 ++- > 3 files changed, 540 insertions(+), 585 deletions(-) > delete mode 100644 drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c This doesn't apply to my tree :( ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v4 1/3] staging: lustre: fix coding style errors
On Tue, Feb 10, 2015 at 08:36:19PM +0200, Tal Shorer wrote: > fix the following coding style error in > drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c: > initialization of lnet_table_header (static pointer) to NULL > > Signed-off-by: Tal Shorer > --- > drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Please put the error you are fixing in the subject, otherwise we have no idea :( ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v4 2/3] staging: lustre: fix coding style errors
On Tue, Feb 10, 2015 at 08:36:20PM +0200, Tal Shorer wrote: > fix the following coding style error in > drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c: > initialization of min_watchdog_ratelimit (static int) to 0 > > for clarity's sake, the "= 0" is kept as part of a comment > > Signed-off-by: Tal Shorer > --- > drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Same exact subject as 1/3, yet it does something different, which makes no sense :( ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v4 3/3] staging: lustre: fix coding style errors fix the
On Tue, Feb 10, 2015 at 08:36:21PM +0200, Tal Shorer wrote: > following coding style error in > drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c: > missing spaces around '=' > > Signed-off-by: Tal Shorer > --- > drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Your subject doesn't make sense :( ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/1] Lustre: single statement macros should not use do {} while (0)
On Wed, Feb 18, 2015 at 05:37:55PM -0300, Mario J. Rugiero wrote: > This fixes all appearances of the warning but one, as that one seems to be > intentional: > > WARNING: Single statement macros should not use a do {} while (0) loop > #1221: FILE: lustre/include/lustre_dlm.h:1221: > +#define LDLM_LOCK_RELEASE(lock) \ > +do { \ > + /*LDLM_DEBUG((lock), "put");*/\ > + ldlm_lock_put(lock);\ > +} while (0) > > I didn't know if I should touch this debug statement, and if uncommented it > would certainly be incorrect to erase the do-while construct. > > Regards, > Mario. > >From 01a11dfacba84065a69deed929acaa84d249b7b5 Mon Sep 17 00:00:00 2001 > From: "Mario J. Rugiero" > Date: Wed, 18 Feb 2015 17:23:39 -0300 > Subject: [PATCH] Lustre: single statement macros should not use a do {} while > (0) loop. Why is this here, and there is no changelog info here? Please fix up and resend. thanks, greg k-h- ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: [PATCH RFC 0/3] Drivers: hv: utils: re-implement the kernel/userspace communication layer
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Friday, February 27, 2015 8:14 AM > To: KY Srinivasan; de...@linuxdriverproject.org > Cc: Haiyang Zhang; linux-ker...@vger.kernel.org; Dexuan Cui; Radim Krčmář; > Greg Kroah-Hartman; linux-...@vger.kernel.org > Subject: [PATCH RFC 0/3] Drivers: hv: utils: re-implement the > kernel/userspace communication layer > > This series converts kvp/vss daemons to use misc char devices instead of > netlink for userspace/kernel communication and then updates fcopy to be > consistent with kvp/vss. > > Userspace/kernel communication via netlink has a number of issues: > - It is hard for userspace to figure out if the kernel part was loaded or not > and this fact can change as there is a way to enable/disable the service > from > host side. Racy daemon startup is also a problem. > - When the userspace daemon restarts/dies kernel part doesn't receive a > notification. > - Netlink communication is not stable under heavy load. > - ... > > RFC: I'm a bit puzzled on how to split commits 1 and 2 avoiding breakages. > Commit 3 can definitely be split, however, it is consistent with commits 1 and > 2 at this moment and I'm not sure such split will simplify the review. > > Vitaly Kuznetsov (3): > Drivers: hv: kvp: convert userspace/kernel communication to using char > device > Drivers: hv: vss: convert userspace/kernel communication to using char > device > Drivers: hv: fcopy: make it consistent with vss/kvp Vitaly, Thank you for working on this. Before I give you detailed comments on your patches, I wanted to understand if the cost of maintaining compatibility was carefully considered. As a first step we could look at cleanly abstracting the transport (between user level and the kernel) out of the kernel driver code as well as the new daemon code. What are your thoughts on this. Version negotiation is obviously key to maintaining compatibility. One of the options we can explore is to continue to use netlink for version negotiation and for appropriate daemon versions, we could use the char device mechanism for transporting the payload. I like the new state machine you have defined and this is orthogonal to the transport options we have. You have sought feedback on how we can split up these changes into smaller patches. This is how I would proceed here: Patch(es) to clean up the current code: Patch(es) to clean up the state machine. Patch(es) to isolate the kernel/user transport Patch(es) to implement the new transport Regards, K. Y > > drivers/hv/hv_fcopy.c | 395 +--- > --- > drivers/hv/hv_kvp.c | 396 +++- > > drivers/hv/hv_snapshot.c| 335 +++- > - > include/uapi/linux/hyperv.h | 10 ++ > tools/hv/hv_fcopy_daemon.c | 48 -- > tools/hv/hv_kvp_daemon.c| 187 - > tools/hv/hv_vss_daemon.c| 141 +++- > 7 files changed, 824 insertions(+), 688 deletions(-) > > -- > 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging:lustre:libcfs: Merge linux-proc.c into module.c
hey greg, I've updated to the latest linux-next, applied the patch and compiled with no issues. I think it might be due to clashes with another patch that has been proposed by Tal Shorer to fix style violations in linux-proc.c (which my patch merges into module.c) Tal - do you want to take my patch, apply it onto your tree, and then apply the style fixes? It shouldn't be too difficult to merge our patches into one series? On Sun, Mar 01, 2015 at 05:27:01PM -0800, Greg KH wrote: > On Tue, Feb 10, 2015 at 07:24:40PM +0800, Matt Tyler wrote: > > module.c was previously the sole exporter of symbols from module.c > > This patch removes the global symbols by merging the two files. > > > > Signed-off-by: Matthew Tyler > > --- > > drivers/staging/lustre/lustre/libcfs/Makefile | 2 +- > > .../lustre/lustre/libcfs/linux/linux-proc.c| 577 > > - > > drivers/staging/lustre/lustre/libcfs/module.c | 546 > > ++- > > 3 files changed, 540 insertions(+), 585 deletions(-) > > delete mode 100644 drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c > > This doesn't apply to my tree :( ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging:lustre:libcfs: Merge linux-proc.c into module.c
A: No. Q: Should I include quotations after my reply? http://daringfireball.net/2007/07/on_top On Mon, Mar 02, 2015 at 11:18:09AM +0800, Matt Tyler wrote: > hey greg, I've updated to the latest linux-next, applied the patch and > compiled with no issues. Please work against my staging-testing branch of staging.git, as it contains over a hundred additional patches that I've applied in the past day. > I think it might be due to clashes with another patch that has been > proposed by Tal Shorer to fix style violations in linux-proc.c (which > my patch merges into module.c) > > Tal - do you want to take my patch, apply it onto your tree, and then > apply the style fixes? It shouldn't be too difficult to merge our > patches into one series? If I've already accepted a conflicting patch, there's nothing to "merge", you just have to update your patch. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/3] drivers:pnp Add support for descendants claiming memory address space
On Tue, Feb 17, 2015 at 11:41:49AM -0800, Jake Oshins wrote: > This patch adds some wrapper functions in the pnp layer. The intent is > to allow memory address space claims by devices which are descendants > (a child or grandchild of) a device which is already part of the pnp > layer. This allows a device to make a resource claim that doesn't > conflict with its "aunts" and "uncles." > > This is useful in a Hyper-V VM because some paravirtual "devices" need > memory-mapped I/O space, and their aunts and uncles can be PCI devices. > Furthermore, the hypervisor expresses the possible memory address > combinations for the devices in the VM through the ACPI namespace. > The paravirtual devices need to suballocate from the ACPI nodes, and > they need to avoid conflicting with choices that the Linux PCI code > makes about the PCI devices in the VM. > > It might seem like this should be done in the platform layer rather > than the pnp layer, but the platform layer assumes that the > configuration of the devices in the machine are static, or at least > expressed by firmware in a static fashion. The nature of a Hyper-V > VM is that new devices can be added while the machine is running, > and the potential configurations for them are expressed as part of > the paravirtual communications channel. This much more naturally > aligns with the pnp layer. > > Signed-off-by: Jake Oshins > --- > drivers/pnp/Makefile | 2 +- > drivers/pnp/base.h | 2 + > drivers/pnp/core.c | 1 + > drivers/pnp/descendant.c | 117 > +++ > include/linux/pnp.h | 23 ++ > 5 files changed, 144 insertions(+), 1 deletion(-) > create mode 100644 drivers/pnp/descendant.c At first glance, this looks ok. Does it change the sysfs layout of hyperv devices? also, I'd like KY to sign-off on it, verifying that he at least tested the series and it works for him. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: [PATCH 1/3] drivers:pnp Add support for descendants claiming memory address space
> -Original Message- > From: Greg KH [mailto:gre...@linuxfoundation.org] > Sent: Sunday, March 1, 2015 7:34 PM > To: Jake Oshins > Cc: rafael.j.wyso...@intel.com; KY Srinivasan; linux-ker...@vger.kernel.org; > de...@linuxdriverproject.org; o...@aepfle.de; a...@canonical.com; > vkuzn...@redhat.com > Subject: Re: [PATCH 1/3] drivers:pnp Add support for descendants claiming > memory address space > > On Tue, Feb 17, 2015 at 11:41:49AM -0800, Jake Oshins wrote: > > This patch adds some wrapper functions in the pnp layer. The intent > > is to allow memory address space claims by devices which are > > descendants (a child or grandchild of) a device which is already part > > of the pnp layer. This allows a device to make a resource claim that > > doesn't conflict with its "aunts" and "uncles." > > > > This is useful in a Hyper-V VM because some paravirtual "devices" need > > memory-mapped I/O space, and their aunts and uncles can be PCI devices. > > Furthermore, the hypervisor expresses the possible memory address > > combinations for the devices in the VM through the ACPI namespace. > > The paravirtual devices need to suballocate from the ACPI nodes, and > > they need to avoid conflicting with choices that the Linux PCI code > > makes about the PCI devices in the VM. > > > > It might seem like this should be done in the platform layer rather > > than the pnp layer, but the platform layer assumes that the > > configuration of the devices in the machine are static, or at least > > expressed by firmware in a static fashion. The nature of a Hyper-V VM > > is that new devices can be added while the machine is running, and the > > potential configurations for them are expressed as part of the > > paravirtual communications channel. This much more naturally aligns > > with the pnp layer. > > > > Signed-off-by: Jake Oshins > > --- > > drivers/pnp/Makefile | 2 +- > > drivers/pnp/base.h | 2 + > > drivers/pnp/core.c | 1 + > > drivers/pnp/descendant.c | 117 > +++ > > include/linux/pnp.h | 23 ++ > > 5 files changed, 144 insertions(+), 1 deletion(-) create mode 100644 > > drivers/pnp/descendant.c > > At first glance, this looks ok. Does it change the sysfs layout of hyperv > devices? > > also, I'd like KY to sign-off on it, verifying that he at least tested the > series and > it works for him. Greg, Dan had some comments that Jake will address and resend. Also, we are waiting for Rafael to review this patch. Regards, K. Y > > thanks, > > greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH Resend] staging: speakup: Fix warning of line over 80 characters.
On Sat, Feb 07, 2015 at 08:19:01PM -0800, Shirish Gajera wrote: > This patch fixes the checkpatch.pl warning: > > WARNING: line over 80 characters > All line over 80 characters in driver/staging/speakup/* are fixed. > > Signed-off-by: Shirish Gajera > --- > drivers/staging/speakup/main.c | 12 > drivers/staging/speakup/serialio.h | 3 ++- > drivers/staging/speakup/speakup.h| 6 -- > drivers/staging/speakup/speakup_decext.c | 6 -- > drivers/staging/speakup/speakup_decpc.c | 6 -- > drivers/staging/speakup/spk_priv.h | 3 ++- > drivers/staging/speakup/spk_types.h | 3 ++- > 7 files changed, 26 insertions(+), 13 deletions(-) This patch fails to apply to my tree. Can you please refresh it against the staging-testing branch of staging.git and resend? thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/1] Staging: fbtft: fb_ssd1331: replaced C99 comments with C89
On Sun, Mar 1, 2015 at 5:18 PM, Greg Kroah-Hartman wrote: > On Fri, Feb 27, 2015 at 09:44:42PM -0800, Tolga Ceylan wrote: >> Replaced C99 '//' comments with C89 '/**/' >> >> Signed-off-by: Tolga Ceylan >> --- >> drivers/staging/fbtft/fb_ssd1331.c | 30 +++--- >> 1 file changed, 15 insertions(+), 15 deletions(-) > > Doesn't apply to my tree :( Ahh, I see it in staging. It's already patched. :-) ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH char-misc] mei: bus: () can be static
drivers/hv/vmbus_drv.c:51:5: sparse: symbol 'hyperv_panic_event' was not declared. Should it be static? drivers/hv/vmbus_drv.c:51:5: sparse: symbol 'hyperv_panic_event' was not declared. Should it be static? drivers/hv/vmbus_drv.c:51:5: sparse: symbol 'hyperv_panic_event' was not declared. Should it be static? drivers/hv/vmbus_drv.c:51:5: sparse: symbol 'hyperv_panic_event' was not declared. Should it be static? Signed-off-by: Fengguang Wu --- vmbus_drv.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index 526fa8b..8313e25 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c @@ -48,7 +48,7 @@ static struct completion probe_event; static int irq; -int hyperv_panic_event(struct notifier_block *nb, +static int hyperv_panic_event(struct notifier_block *nb, unsigned long event, void *ptr) { struct pt_regs *regs; ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[char-misc:char-misc-testing 25/45] drivers/hv/vmbus_drv.c:67:9: sparse: constant 0x8000000000000000 is so big it is unsigned long
tree: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git char-misc-testing head: b3de8e3719e582f3182bb504295e4a8e43c8c96f commit: 96c1d0581d00f7abe033350edb021a9d947d8d81 [25/45] Drivers: hv: vmbus: Add support for VMBus panic notifier handler reproduce: # apt-get install sparse git checkout 96c1d0581d00f7abe033350edb021a9d947d8d81 make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__ sparse warnings: (new ones prefixed by >>) >> drivers/hv/vmbus_drv.c:67:9: sparse: constant 0x8000 is so big >> it is unsigned long >> drivers/hv/vmbus_drv.c:67:9: sparse: constant 0x8000 is so big >> it is unsigned long >> drivers/hv/vmbus_drv.c:51:5: sparse: symbol 'hyperv_panic_event' was not >> declared. Should it be static? >> drivers/hv/vmbus_drv.c:67:9: sparse: cast truncates bits from constant value >> (8000 becomes 0) Please review and possibly fold the followup patch. vim +67 drivers/hv/vmbus_drv.c 45 46 static struct tasklet_struct msg_dpc; 47 static struct completion probe_event; 48 static int irq; 49 50 > 51 int hyperv_panic_event(struct notifier_block *nb, 52 unsigned long event, void *ptr) 53 { 54 struct pt_regs *regs; 55 56 regs = current_pt_regs(); 57 58 wrmsrl(HV_X64_MSR_CRASH_P0, regs->ip); 59 wrmsrl(HV_X64_MSR_CRASH_P1, regs->ax); 60 wrmsrl(HV_X64_MSR_CRASH_P2, regs->bx); 61 wrmsrl(HV_X64_MSR_CRASH_P3, regs->cx); 62 wrmsrl(HV_X64_MSR_CRASH_P4, regs->dx); 63 64 /* 65 * Let Hyper-V know there is crash data available 66 */ > 67 wrmsrl(HV_X64_MSR_CRASH_CTL, HV_CRASH_CTL_CRASH_NOTIFY); 68 return NOTIFY_DONE; 69 } 70 --- 0-DAY kernel test infrastructureOpen Source Technology Center http://lists.01.org/mailman/listinfo/kbuild Intel Corporation ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/2] Lustre: get rid of deprecated cpumask calls
From: Oleg Drokin A recent crash report with CONFIG_CPUMASK_OFFSTACK enabled set off a chain of emails through which I learned that cpus_* functions are deprecated and should not be really used to operate on cpumasks. These two patches do just that, replacing cpus_* and cpu_* calls with cpumask_ equivalents, getting rid of a sizable number or NR_CPUS references please consider. Oleg Drokin (2): staging/lustre/ptlrpc: Do not use deprecated cpus_* functions staging/lustre/libcfs: replace deprecated cpus_ calls with cpumask_ .../staging/lustre/lustre/libcfs/linux/linux-cpu.c | 78 +++--- drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c | 8 +-- drivers/staging/lustre/lustre/ptlrpc/service.c | 9 +-- 3 files changed, 46 insertions(+), 49 deletions(-) -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/2] staging/lustre/libcfs: replace deprecated cpus_ calls with cpumask_
From: Oleg Drokin Rusty Russel advises that cpus_* functions are deprecated to work on cpumasks and cpumask_* functions should be called instead, otherwise problems with CPUMASK_OFFSTACK arise. Signed-off-by: Oleg Drokin --- .../staging/lustre/lustre/libcfs/linux/linux-cpu.c | 78 +++--- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-cpu.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-cpu.c index 05f7595..1eeacef 100644 --- a/drivers/staging/lustre/lustre/libcfs/linux/linux-cpu.c +++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-cpu.c @@ -240,8 +240,8 @@ cfs_cpt_weight(struct cfs_cpt_table *cptab, int cpt) LASSERT(cpt == CFS_CPT_ANY || (cpt >= 0 && cpt < cptab->ctb_nparts)); return cpt == CFS_CPT_ANY ? - cpus_weight(*cptab->ctb_cpumask) : - cpus_weight(*cptab->ctb_parts[cpt].cpt_cpumask); + cpumask_weight(cptab->ctb_cpumask) : + cpumask_weight(cptab->ctb_parts[cpt].cpt_cpumask); } EXPORT_SYMBOL(cfs_cpt_weight); @@ -251,8 +251,8 @@ cfs_cpt_online(struct cfs_cpt_table *cptab, int cpt) LASSERT(cpt == CFS_CPT_ANY || (cpt >= 0 && cpt < cptab->ctb_nparts)); return cpt == CFS_CPT_ANY ? - any_online_cpu(*cptab->ctb_cpumask) != NR_CPUS : - any_online_cpu(*cptab->ctb_parts[cpt].cpt_cpumask) != NR_CPUS; + any_online_cpu(*cptab->ctb_cpumask) < nr_cpu_ids : + any_online_cpu(*cptab->ctb_parts[cpt].cpt_cpumask) < nr_cpu_ids; } EXPORT_SYMBOL(cfs_cpt_online); @@ -283,7 +283,7 @@ cfs_cpt_set_cpu(struct cfs_cpt_table *cptab, int cpt, int cpu) LASSERT(cpt >= 0 && cpt < cptab->ctb_nparts); - if (cpu < 0 || cpu >= NR_CPUS || !cpu_online(cpu)) { + if (cpu < 0 || cpu >= nr_cpu_ids || !cpu_online(cpu)) { CDEBUG(D_INFO, "CPU %d is invalid or it's offline\n", cpu); return 0; } @@ -296,11 +296,11 @@ cfs_cpt_set_cpu(struct cfs_cpt_table *cptab, int cpt, int cpu) cptab->ctb_cpu2cpt[cpu] = cpt; - LASSERT(!cpu_isset(cpu, *cptab->ctb_cpumask)); - LASSERT(!cpu_isset(cpu, *cptab->ctb_parts[cpt].cpt_cpumask)); + LASSERT(!cpumask_test_cpu(cpu, cptab->ctb_cpumask)); + LASSERT(!cpumask_test_cpu(cpu, cptab->ctb_parts[cpt].cpt_cpumask)); - cpu_set(cpu, *cptab->ctb_cpumask); - cpu_set(cpu, *cptab->ctb_parts[cpt].cpt_cpumask); + cpumask_set_cpu(cpu, cptab->ctb_cpumask); + cpumask_set_cpu(cpu, cptab->ctb_parts[cpt].cpt_cpumask); node = cpu_to_node(cpu); @@ -324,7 +324,7 @@ cfs_cpt_unset_cpu(struct cfs_cpt_table *cptab, int cpt, int cpu) LASSERT(cpt == CFS_CPT_ANY || (cpt >= 0 && cpt < cptab->ctb_nparts)); - if (cpu < 0 || cpu >= NR_CPUS) { + if (cpu < 0 || cpu >= nr_cpu_ids) { CDEBUG(D_INFO, "Invalid CPU id %d\n", cpu); return; } @@ -344,11 +344,11 @@ cfs_cpt_unset_cpu(struct cfs_cpt_table *cptab, int cpt, int cpu) return; } - LASSERT(cpu_isset(cpu, *cptab->ctb_parts[cpt].cpt_cpumask)); - LASSERT(cpu_isset(cpu, *cptab->ctb_cpumask)); + LASSERT(cpumask_test_cpu(cpu, cptab->ctb_parts[cpt].cpt_cpumask)); + LASSERT(cpumask_test_cpu(cpu, cptab->ctb_cpumask)); - cpu_clear(cpu, *cptab->ctb_parts[cpt].cpt_cpumask); - cpu_clear(cpu, *cptab->ctb_cpumask); + cpumask_clear_cpu(cpu, cptab->ctb_parts[cpt].cpt_cpumask); + cpumask_clear_cpu(cpu, cptab->ctb_cpumask); cptab->ctb_cpu2cpt[cpu] = -1; node = cpu_to_node(cpu); @@ -383,7 +383,7 @@ cfs_cpt_set_cpumask(struct cfs_cpt_table *cptab, int cpt, cpumask_t *mask) { int i; - if (cpus_weight(*mask) == 0 || any_online_cpu(*mask) == NR_CPUS) { + if (cpumask_weight(mask) == 0 || any_online_cpu(*mask) >= nr_cpu_ids) { CDEBUG(D_INFO, "No online CPU is found in the CPU mask for CPU partition %d\n", cpt); return 0; @@ -554,7 +554,7 @@ EXPORT_SYMBOL(cfs_cpt_current); int cfs_cpt_of_cpu(struct cfs_cpt_table *cptab, int cpu) { - LASSERT(cpu >= 0 && cpu < NR_CPUS); + LASSERT(cpu >= 0 && cpu < nr_cpu_ids); return cptab->ctb_cpu2cpt[cpu]; } @@ -578,14 +578,14 @@ cfs_cpt_bind(struct cfs_cpt_table *cptab, int cpt) nodemask = cptab->ctb_parts[cpt].cpt_nodemask; } - if (any_online_cpu(*cpumask) == NR_CPUS) { + if (any_online_cpu(*cpumask) >= nr_cpu_ids) { CERROR("No online CPU found in CPU partition %d, did someone do CPU hotplug on system? You might need to reload Lustre modules to keep system working well.\n", cpt); return -EINVAL; } for_each_online_cpu(i) { - if (cpu_isset(i, *cpumask)) + if (cpumask_test_cpu(i, cpumask)) con
[PATCH 1/2] staging/lustre/ptlrpc: Do not use deprecated cpus_* functions
From: Oleg Drokin As per Rusty Russel, cpus_* functions are deprecated. When mixing cpumask_copy with cpus_weight, they operate on different sized masks if CPUMASK_OFFSTACK is enabled, causing an immediate assertion failure. Copying of cpumasks by assignment is also not allowed now. Additionally, in ptlrpc/service.c avoid the cpumask copies, since we only use it to check how many siblings are there for core #0 and nothing else. Reported-by: Tyson Whitehead Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c | 8 drivers/staging/lustre/lustre/ptlrpc/service.c | 9 +++-- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c b/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c index 4621b71..7f13a28 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c +++ b/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c @@ -511,10 +511,10 @@ static int ptlrpcd_bind(int index, int max) #if defined(CONFIG_NUMA) { int i; - mask = *cpumask_of_node(cpu_to_node(index)); + cpumask_copy(&mask, cpumask_of_node(cpu_to_node(index))); for (i = max; i < num_online_cpus(); i++) - cpu_clear(i, mask); - pc->pc_npartners = cpus_weight(mask) - 1; + cpumask_clear_cpu(i, &mask); + pc->pc_npartners = cpumask_weight(&mask) - 1; set_bit(LIOD_BIND, &pc->pc_flags); } #else @@ -554,7 +554,7 @@ static int ptlrpcd_bind(int index, int max) * that are already initialized */ for (pidx = 0, i = 0; i < index; i++) { - if (cpu_isset(i, mask)) { + if (cpumask_test_cpu(i, &mask)) { ppc = &ptlrpcds->pd_threads[i]; pc->pc_partners[pidx++] = ppc; ppc->pc_partners[ppc-> diff --git a/drivers/staging/lustre/lustre/ptlrpc/service.c b/drivers/staging/lustre/lustre/ptlrpc/service.c index 635b12b..8e61421 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/service.c +++ b/drivers/staging/lustre/lustre/ptlrpc/service.c @@ -543,7 +543,6 @@ ptlrpc_server_nthreads_check(struct ptlrpc_service *svc, if (tc->tc_thr_factor != 0) { int factor = tc->tc_thr_factor; const int fade = 4; - cpumask_t mask; /* * User wants to increase number of threads with for @@ -557,8 +556,8 @@ ptlrpc_server_nthreads_check(struct ptlrpc_service *svc, * have too many threads no matter how many cores/HTs * there are. */ - cpumask_copy(&mask, topology_thread_cpumask(0)); - if (cpus_weight(mask) > 1) { /* weight is # of HTs */ + /* weight is # of HTs */ + if (cpumask_weight(topology_thread_cpumask(0)) > 1) { /* depress thread factor for hyper-thread */ factor = factor - (factor >> 1) + (factor >> 3); } @@ -2752,7 +2751,6 @@ int ptlrpc_start_thread(struct ptlrpc_service_part *svcpt, int wait) int ptlrpc_hr_init(void) { - cpumask_t mask; struct ptlrpc_hr_partition *hrp; struct ptlrpc_hr_thread *hrt; int rc; @@ -2770,8 +2768,7 @@ int ptlrpc_hr_init(void) init_waitqueue_head(&ptlrpc_hr.hr_waitq); - cpumask_copy(&mask, topology_thread_cpumask(0)); - weight = cpus_weight(mask); + weight = cpumask_weight(topology_thread_cpumask(0)); cfs_percpt_for_each(hrp, i, ptlrpc_hr.hr_partitions) { hrp->hrp_cpt = i; -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel