* [PATCH] staging: sm750fb: Fix printk() style warning @ 2016-10-02 18:05 Edward Lipinsky 2016-10-02 18:13 ` Greg KH 0 siblings, 1 reply; 7+ messages in thread From: Edward Lipinsky @ 2016-10-02 18:05 UTC (permalink / raw) To: sudipm.mukherjee, teddy.wang, gregkh, sudip Cc: linux-fbdev, devel, linux-kernel This patch fixes the checkpatch.pl warning: WARNING: printk() should include KERN_ facility level Signed-off-by: Edward Lipinsky <ellipinsky@gmail.com> --- drivers/staging/sm750fb/ddk750_help.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/sm750fb/ddk750_help.c b/drivers/staging/sm750fb/ddk750_help.c index 9637dd3..e72a29c 100644 --- a/drivers/staging/sm750fb/ddk750_help.c +++ b/drivers/staging/sm750fb/ddk750_help.c @@ -11,7 +11,7 @@ void ddk750_set_mmio(void __iomem *addr, unsigned short devId, char revId) devId750 = devId; revId750 = revId; if (revId = 0xfe) - printk("found sm750le\n"); + pr_info("found sm750le\n"); } -- 2.7.4 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] staging: sm750fb: Fix printk() style warning 2016-10-02 18:05 [PATCH] staging: sm750fb: Fix printk() style warning Edward Lipinsky @ 2016-10-02 18:13 ` Greg KH 2016-10-07 4:27 ` Edward Lipinsky 0 siblings, 1 reply; 7+ messages in thread From: Greg KH @ 2016-10-02 18:13 UTC (permalink / raw) To: Edward Lipinsky Cc: sudipm.mukherjee, teddy.wang, sudip, linux-fbdev, devel, linux-kernel On Sun, Oct 02, 2016 at 11:05:05AM -0700, Edward Lipinsky wrote: > This patch fixes the checkpatch.pl warning: > > WARNING: printk() should include KERN_ facility level > > Signed-off-by: Edward Lipinsky <ellipinsky@gmail.com> > --- > drivers/staging/sm750fb/ddk750_help.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/sm750fb/ddk750_help.c b/drivers/staging/sm750fb/ddk750_help.c > index 9637dd3..e72a29c 100644 > --- a/drivers/staging/sm750fb/ddk750_help.c > +++ b/drivers/staging/sm750fb/ddk750_help.c > @@ -11,7 +11,7 @@ void ddk750_set_mmio(void __iomem *addr, unsigned short devId, char revId) > devId750 = devId; > revId750 = revId; > if (revId = 0xfe) > - printk("found sm750le\n"); > + pr_info("found sm750le\n"); Why can't you use dev_info() here? thanks, greg k-h ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] staging: sm750fb: Fix printk() style warning 2016-10-02 18:13 ` Greg KH @ 2016-10-07 4:27 ` Edward Lipinsky 2016-10-07 9:12 ` Mike Rapoport 0 siblings, 1 reply; 7+ messages in thread From: Edward Lipinsky @ 2016-10-07 4:27 UTC (permalink / raw) To: Greg KH Cc: sudipm.mukherjee, teddy.wang, sudip, linux-fbdev, devel, linux-kernel On Sun, Oct 02, 2016 at 08:13:01PM +0200, Greg KH wrote: > On Sun, Oct 02, 2016 at 11:05:05AM -0700, Edward Lipinsky wrote: > > This patch fixes the checkpatch.pl warning: > > > > WARNING: printk() should include KERN_ facility level > > > > Signed-off-by: Edward Lipinsky <ellipinsky@gmail.com> > > --- > > drivers/staging/sm750fb/ddk750_help.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/staging/sm750fb/ddk750_help.c b/drivers/staging/sm750fb/ddk750_help.c > > index 9637dd3..e72a29c 100644 > > --- a/drivers/staging/sm750fb/ddk750_help.c > > +++ b/drivers/staging/sm750fb/ddk750_help.c > > @@ -11,7 +11,7 @@ void ddk750_set_mmio(void __iomem *addr, unsigned short devId, char revId) > > devId750 = devId; > > revId750 = revId; > > if (revId = 0xfe) > > - printk("found sm750le\n"); > > + pr_info("found sm750le\n"); > > Why can't you use dev_info() here? > > thanks, > > greg k-h It should work, but I'm not sure what should change in the header files to do it--esp. to make the dev parameter available in ddk750_help.c. (Only sm750.c uses dev_ style logging now, the rest of the driver still uses pr_*.) Thanks, Ed Lipinsky ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] staging: sm750fb: Fix printk() style warning 2016-10-07 4:27 ` Edward Lipinsky @ 2016-10-07 9:12 ` Mike Rapoport 2016-10-10 14:31 ` Edward Lipinsky 0 siblings, 1 reply; 7+ messages in thread From: Mike Rapoport @ 2016-10-07 9:12 UTC (permalink / raw) To: Edward Lipinsky Cc: Greg KH, devel, linux-fbdev, sudip, teddy.wang, linux-kernel, sudipm.mukherjee On Thu, Oct 06, 2016 at 09:27:36PM -0700, Edward Lipinsky wrote: > On Sun, Oct 02, 2016 at 08:13:01PM +0200, Greg KH wrote: > > On Sun, Oct 02, 2016 at 11:05:05AM -0700, Edward Lipinsky wrote: > > > This patch fixes the checkpatch.pl warning: > > > > > > WARNING: printk() should include KERN_ facility level > > > > > > Signed-off-by: Edward Lipinsky <ellipinsky@gmail.com> > > > --- > > > drivers/staging/sm750fb/ddk750_help.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/drivers/staging/sm750fb/ddk750_help.c b/drivers/staging/sm750fb/ddk750_help.c > > > index 9637dd3..e72a29c 100644 > > > --- a/drivers/staging/sm750fb/ddk750_help.c > > > +++ b/drivers/staging/sm750fb/ddk750_help.c > > > @@ -11,7 +11,7 @@ void ddk750_set_mmio(void __iomem *addr, unsigned short devId, char revId) > > > devId750 = devId; > > > revId750 = revId; > > > if (revId = 0xfe) > > > - printk("found sm750le\n"); > > > + pr_info("found sm750le\n"); > > > > Why can't you use dev_info() here? > > > > thanks, > > > > greg k-h > > It should work, but I'm not sure what should change in the header files to > do it--esp. to make the dev parameter available in ddk750_help.c. (Only > sm750.c uses dev_ style logging now, the rest of the driver still uses pr_*.) This printk can be moved to lynxfb_pci_probe, and then it should be no problem to use dev_info. Just make sure to update the commit message appropriately. > Thanks, > > Ed Lipinsky -- Sincerely yours, Mike. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] staging: sm750fb: Fix printk() style warning 2016-10-07 9:12 ` Mike Rapoport @ 2016-10-10 14:31 ` Edward Lipinsky 2016-10-13 14:39 ` Mike Rapoport 0 siblings, 1 reply; 7+ messages in thread From: Edward Lipinsky @ 2016-10-10 14:31 UTC (permalink / raw) To: Mike Rapoport Cc: Greg KH, devel, linux-fbdev, sudip, teddy.wang, linux-kernel, sudipm.mukherjee On Fri, Oct 07, 2016 at 11:12:04AM +0200, Mike Rapoport wrote: > On Thu, Oct 06, 2016 at 09:27:36PM -0700, Edward Lipinsky wrote: > > On Sun, Oct 02, 2016 at 08:13:01PM +0200, Greg KH wrote: > > > On Sun, Oct 02, 2016 at 11:05:05AM -0700, Edward Lipinsky wrote: > > > > This patch fixes the checkpatch.pl warning: > > > > > > > > WARNING: printk() should include KERN_ facility level > > > > > > > > Signed-off-by: Edward Lipinsky <ellipinsky@gmail.com> > > > > --- > > > > drivers/staging/sm750fb/ddk750_help.c | 2 +- > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > diff --git a/drivers/staging/sm750fb/ddk750_help.c b/drivers/staging/sm750fb/ddk750_help.c > > > > index 9637dd3..e72a29c 100644 > > > > --- a/drivers/staging/sm750fb/ddk750_help.c > > > > +++ b/drivers/staging/sm750fb/ddk750_help.c > > > > @@ -11,7 +11,7 @@ void ddk750_set_mmio(void __iomem *addr, unsigned short devId, char revId) > > > > devId750 = devId; > > > > revId750 = revId; > > > > if (revId = 0xfe) > > > > - printk("found sm750le\n"); > > > > + pr_info("found sm750le\n"); > > > > > > Why can't you use dev_info() here? > > > > > > thanks, > > > > > > greg k-h > > > > It should work, but I'm not sure what should change in the header files to > > do it--esp. to make the dev parameter available in ddk750_help.c. (Only > > sm750.c uses dev_ style logging now, the rest of the driver still uses pr_*.) > > This printk can be moved to lynxfb_pci_probe, and then it should be no > problem to use dev_info. Just make sure to update the commit message > appropriately. > > > Thanks, > > > > Ed Lipinsky > > -- > Sincerely yours, > Mike. > Thanks, that makes sense. I tried deleting the if statement and printk() from ddk750_help.c, and adding the following in lynxfb_pci_probe() after calling hw_sm750_map() and checking for errors: if (sm750_dev->revid = 0xfe) dev_info(&pdev->dev, "found sm750le\n"); The driver compiles, loads and unloads ok with this code. Does this look correct? Regards, Ed L. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] staging: sm750fb: Fix printk() style warning 2016-10-10 14:31 ` Edward Lipinsky @ 2016-10-13 14:39 ` Mike Rapoport 2016-10-14 5:18 ` Edward Lipinsky 0 siblings, 1 reply; 7+ messages in thread From: Mike Rapoport @ 2016-10-13 14:39 UTC (permalink / raw) To: Edward Lipinsky Cc: Greg KH, devel, linux-fbdev, sudip, teddy.wang, linux-kernel, sudipm.mukherjee On Mon, Oct 10, 2016 at 07:31:46AM -0700, Edward Lipinsky wrote: > > Thanks, that makes sense. I tried deleting the if statement and printk() > from ddk750_help.c, and adding the following in lynxfb_pci_probe() after > calling hw_sm750_map() and checking for errors: > > if (sm750_dev->revid = 0xfe) > dev_info(&pdev->dev, "found sm750le\n"); > > The driver compiles, loads and unloads ok with this code. > > Does this look correct? Yep, seems just right. > Regards, > Ed L. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] staging: sm750fb: Fix printk() style warning 2016-10-13 14:39 ` Mike Rapoport @ 2016-10-14 5:18 ` Edward Lipinsky 0 siblings, 0 replies; 7+ messages in thread From: Edward Lipinsky @ 2016-10-14 5:18 UTC (permalink / raw) To: Mike Rapoport Cc: Greg KH, devel, linux-fbdev, sudip, teddy.wang, linux-kernel, sudipm.mukherjee On Thu, Oct 13, 2016 at 05:39:22PM +0300, Mike Rapoport wrote: > On Mon, Oct 10, 2016 at 07:31:46AM -0700, Edward Lipinsky wrote: > > > > Thanks, that makes sense. I tried deleting the if statement and printk() > > from ddk750_help.c, and adding the following in lynxfb_pci_probe() after > > calling hw_sm750_map() and checking for errors: > > > > if (sm750_dev->revid = 0xfe) > > dev_info(&pdev->dev, "found sm750le\n"); > > > > The driver compiles, loads and unloads ok with this code. > > > > Does this look correct? > > Yep, seems just right. > > > Regards, > > Ed L. Good, thanks. I will submit an updated patch. Regards, Ed L. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-10-14 5:18 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-10-02 18:05 [PATCH] staging: sm750fb: Fix printk() style warning Edward Lipinsky 2016-10-02 18:13 ` Greg KH 2016-10-07 4:27 ` Edward Lipinsky 2016-10-07 9:12 ` Mike Rapoport 2016-10-10 14:31 ` Edward Lipinsky 2016-10-13 14:39 ` Mike Rapoport 2016-10-14 5:18 ` Edward Lipinsky
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).