* Re: [PATCH 10/13] staging: sm750: blank line after declaration
From: Dan Carpenter @ 2015-03-23 11:26 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <20150322231416.GA17270@x230-arch.club.entropia.de>
On Mon, Mar 23, 2015 at 12:14:17AM +0100, Michel von Czettritz wrote:
> This patch fixes "WARNING: Missing a blank line after declaration"
> checkpatch.pl warnings.
>
> Signed-off-by: Michel von Czettritz <michel.von.czettritz@gmail.com>
> ---
> drivers/staging/sm750fb/sm750.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
> index 90dc801..870bf6f 100644
> --- a/drivers/staging/sm750fb/sm750.c
> +++ b/drivers/staging/sm750fb/sm750.c
> @@ -61,6 +61,7 @@ static char *g_option = NULL;
> static inline void myspin_lock(spinlock_t *sl)
> {
> struct lynx_share *share;
> +
These introduces new checkpatch warnings. Use checkpatch.pl on your own
patches.
regards,
dan carpenter
^ permalink raw reply
* Re: [PATCH 13/13] staging: sm750: move assignment out of if cond
From: Dan Carpenter @ 2015-03-23 11:29 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <20150322231516.GA17336@x230-arch.club.entropia.de>
On Mon, Mar 23, 2015 at 12:15:16AM +0100, Michel von Czettritz wrote:
> This patch moves the assignments from the if conditions to the line before the condition.
> The 3 occurrence are return values and the checks for errors.
>
> Signed-off-by: Michel von Czettritz <michel.von.czettritz@gmail.com>
> ---
> drivers/staging/sm750fb/sm750.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
> index c250882..a4a7fed 100644
> --- a/drivers/staging/sm750fb/sm750.c
> +++ b/drivers/staging/sm750fb/sm750.c
> @@ -474,7 +474,8 @@ static int lynxfb_resume(struct pci_dev *pdev)
>
> console_lock();
>
> - if ((ret = pci_set_power_state(pdev, PCI_D0)) != 0) {
> + ret = pci_set_power_state(pdev, PCI_D0);
> + if (ret != 0) {
Use "if (ret) ". The double negative is not not a waste of time.
regards,
dan carpenter
^ permalink raw reply
* Re: [PATCH RESEND 2 1/5] staging: sm750fb: Use memset_io instead of memset
From: Dan Carpenter @ 2015-03-23 11:51 UTC (permalink / raw)
To: Lorenzo Stoakes
Cc: devel, linux-fbdev, Teddy Wang, Greg KH, linux-kernel,
Sudip Mukherjee
In-Reply-To: <CAA5enKaPnRBT=8Tkx7rm6GQYXMvA=pwxmRYpnkRU8uHok8ypUg@mail.gmail.com>
Oh hm... This is an actual RESEND patch.
RESEND is a flag to show a mess up in the system. I like to take a look
at those to see what went wrong. The process failure was that you
messed up the threading earlier. Take a look at the --in-reply-to flag.
regards,
dan carpenter
^ permalink raw reply
* Re: [PATCH RESEND 2 1/5] staging: sm750fb: Use memset_io instead of memset
From: Lorenzo Stoakes @ 2015-03-23 12:43 UTC (permalink / raw)
To: Dan Carpenter
Cc: devel, linux-fbdev, Teddy Wang, Greg KH, linux-kernel,
Sudip Mukherjee
In-Reply-To: <20150323115129.GI10964@mwanda>
On 23 March 2015 at 11:51, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> Oh hm... This is an actual RESEND patch.
>
> RESEND is a flag to show a mess up in the system. I like to take a look
> at those to see what went wrong. The process failure was that you
> messed up the threading earlier. Take a look at the --in-reply-to flag.
Will do, apologies for the mess up, it makes sense that the v2's
should be replies to their respective v1s.
Best,
--
Lorenzo Stoakes
https:/ljs.io
^ permalink raw reply
* Re: [PATCH] sm750fb: Fix C99 comment and if-else braces
From: Sudip Mukherjee @ 2015-03-23 12:48 UTC (permalink / raw)
To: Amitoj Kaur Chawla; +Cc: teddy.wang, gregkh, linux-fbdev, devel, linux-kernel
In-Reply-To: <20150320142455.GA17954@amitoj-Inspiron-3542>
On Fri, Mar 20, 2015 at 07:54:56PM +0530, Amitoj Kaur Chawla wrote:
> The edits have been made to fix C99 Comment and properly indent
> the if-else statements with the braces.
i think you are doing multiple types of changes in one patch.
better to send it in a series of two, one for the C99 and the other
for the if-else. and there are few more places in that file where C99
is used, any reason why you have chosen only one?
scripts/checkpatch.pl --strict -f drivers/staging/sm750fb/ddk750_chip.c | grep C99 | wc -l
6
and, your patch is not applying, please refresh your patch
against staging-testing.
regards
sudip
>
^ permalink raw reply
* Re: [PATCH RESEND 2 1/5] staging: sm750fb: Use memset_io instead of memset
From: Sudip Mukherjee @ 2015-03-23 12:55 UTC (permalink / raw)
To: Lorenzo Stoakes
Cc: Dan Carpenter, devel, linux-fbdev, Teddy Wang, Greg KH,
linux-kernel
In-Reply-To: <CAA5enKZ0gLUPmhWrC5-WOqF2E9v43x9uvEEy-J_we9-Ty=SUPw@mail.gmail.com>
On Mon, Mar 23, 2015 at 12:43:28PM +0000, Lorenzo Stoakes wrote:
> On 23 March 2015 at 11:51, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> > Oh hm... This is an actual RESEND patch.
> >
> > RESEND is a flag to show a mess up in the system. I like to take a look
> > at those to see what went wrong. The process failure was that you
> > messed up the threading earlier. Take a look at the --in-reply-to flag.
>
> Will do, apologies for the mess up, it makes sense that the v2's
> should be replies to their respective v1s.
and you need to send v3 now :(
your series is not applying. Please refresh it against staging-testing
regards
sudip
>
> Best,
>
> --
> Lorenzo Stoakes
> https:/ljs.io
^ permalink raw reply
* Re: [PATCH] sm750fb: Fix indentation, spacing and switch-case
From: Sudip Mukherjee @ 2015-03-23 12:57 UTC (permalink / raw)
To: Amitoj Kaur Chawla; +Cc: teddy.wang, gregkh, linux-fbdev, devel, linux-kernel
In-Reply-To: <20150320184105.GA19710@amitoj-Inspiron-3542>
On Sat, Mar 21, 2015 at 12:11:05AM +0530, Amitoj Kaur Chawla wrote:
> Fix the spacing problems with correct indentation and correct use of
> braces and spacing in switch-case statements.
same problem with this patch also, it is not applying.
please refresh it against staging-testing.
regards
sudip
>
^ permalink raw reply
* Re: [PATCH RESEND 2 1/5] staging: sm750fb: Use memset_io instead of memset
From: Lorenzo Stoakes @ 2015-03-23 13:02 UTC (permalink / raw)
To: Sudip Mukherjee
Cc: Dan Carpenter, devel, linux-fbdev, Teddy Wang, Greg KH,
linux-kernel
In-Reply-To: <20150323125513.GB8151@sudip-PC>
On 23 March 2015 at 12:55, Sudip Mukherjee <sudipm.mukherjee@gmail.com> wrote:
> and you need to send v3 now :(
> your series is not applying. Please refresh it against staging-testing
Applies to staging-testing for me. Are you sure you're applying the
correct 'RESEND 2' patches?
--
Lorenzo Stoakes
https:/ljs.io
^ permalink raw reply
* Re: [PATCH RESEND 2 1/5] staging: sm750fb: Use memset_io instead of memset
From: Lorenzo Stoakes @ 2015-03-23 13:16 UTC (permalink / raw)
To: Sudip Mukherjee
Cc: Dan Carpenter, devel, linux-fbdev, Teddy Wang, Greg KH,
linux-kernel
In-Reply-To: <20150323131422.GE8151@sudip-PC>
On 23 March 2015 at 13:14, Sudip Mukherjee <sudipm.mukherjee@gmail.com> wrote:
> On Mon, Mar 23, 2015 at 01:02:52PM +0000, Lorenzo Stoakes wrote:
>> On 23 March 2015 at 12:55, Sudip Mukherjee <sudipm.mukherjee@gmail.com> wrote:
>>
>> > and you need to send v3 now :(
>> > your series is not applying. Please refresh it against staging-testing
>>
>> Applies to staging-testing for me. Are you sure you're applying the
>> correct 'RESEND 2' patches?
> i think. if you do git log drivers/staging/sm750fb/
> are you getting the first patch author as
> Ragavendra Nagraj <ragavendra.bn@gmail.com> ?
Yep:-
commit de99befd18c10d8085182a1facbb4b8760b2b6fe
Author: Ragavendra Nagraj <ragavendra.bn@gmail.com>
Date: Wed Mar 18 02:37:42 2015 -0700
staging: sm750fb: Fixed no space and indent warns
I've tried applying resend 2 patches to both linux-next and
staging-testing in Greg's staging.git tree, they apply in both places.
--
Lorenzo Stoakes
https:/ljs.io
^ permalink raw reply
* Re: [PATCH RESEND 2 1/5] staging: sm750fb: Use memset_io instead of memset
From: Lorenzo Stoakes @ 2015-03-23 13:21 UTC (permalink / raw)
To: Sudip Mukherjee
Cc: Dan Carpenter, devel, linux-fbdev, Teddy Wang, Greg KH,
linux-kernel
In-Reply-To: <CAA5enKaj78eY9vG=7vGhBb_=EpwV6yyKKMjNCUY7BuJvDDvpgg@mail.gmail.com>
On 23 March 2015 at 13:16, Lorenzo Stoakes <lstoakes@gmail.com> wrote:
> I've tried applying resend 2 patches to both linux-next and
> staging-testing in Greg's staging.git tree, they apply in both places.
Sigh. Checking the emails I actually sent, I seem to *somehow* have
sent old files in this resend :S I really don't know how this
happened. My copies of the patches all apply perfectly correctly, but
these are not the ones I sent.
I'll bump versions using the correct --in-reply-to to fix this. Apologies again!
Best,
--
Lorenzo Stoakes
https:/ljs.io
^ permalink raw reply
* Re: [PATCH 0/13] staging: sm750: reformat sm750.c
From: Sudip Mukherjee @ 2015-03-23 13:23 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <20150322230718.GA16751@x230-arch.club.entropia.de>
On Mon, Mar 23, 2015 at 02:20:05PM +0300, Dan Carpenter wrote:
> These are going to conflict with Lorenzo's patches.
i just checked and informed Lorenzo that his patchset is not applying
to staging-testing, and this patchset also is not applying. Greg has
already applied patches of Raghavendra and Ricardo Ribalda Delgado.
Michel - please refresh your patchset against staging-testing after
making the changes that Dan has suggested.
regards
sudip
>
> regards,
> dan carpenter
>
^ permalink raw reply
* Re: [PATCH RESEND 2 1/5] staging: sm750fb: Use memset_io instead of memset
From: Lorenzo Stoakes @ 2015-03-23 13:25 UTC (permalink / raw)
To: Sudip Mukherjee
Cc: Dan Carpenter, devel, linux-fbdev, Teddy Wang, Greg KH,
linux-kernel
In-Reply-To: <CAA5enKYLYiMHS3ZNX-9=17VB1zp0z8bgVRxOKgCE12KgCBGYfw@mail.gmail.com>
On 23 March 2015 at 13:21, Lorenzo Stoakes <lstoakes@gmail.com> wrote:
> Sigh. Checking the emails I actually sent, I seem to *somehow* have
> sent old files in this resend :S I really don't know how this
> happened. My copies of the patches all apply perfectly correctly, but
> these are not the ones I sent.
And just to add to my embarrassment, this is actually *not* the case,
they DO all apply, gmail mangled the patches. So they seem fine after
all!
Sudip - could you try to carefully grab each of the 5 patches with
[RESEND 2] in the subject to make sure you are applying them
correctly?
Best,
--
Lorenzo Stoakes
https:/ljs.io
^ permalink raw reply
* Re: [PATCH RESEND 2 1/5] staging: sm750fb: Use memset_io instead of memset
From: Sudip Mukherjee @ 2015-03-23 13:26 UTC (permalink / raw)
To: Lorenzo Stoakes
Cc: Dan Carpenter, devel, linux-fbdev, Teddy Wang, Greg KH,
linux-kernel
In-Reply-To: <CAA5enKbKJm2QeH+rbXB+NKw7+O=eXN-01ifLUZPupJ9BF3q+fQ@mail.gmail.com>
On Mon, Mar 23, 2015 at 01:02:52PM +0000, Lorenzo Stoakes wrote:
> On 23 March 2015 at 12:55, Sudip Mukherjee <sudipm.mukherjee@gmail.com> wrote:
>
> > and you need to send v3 now :(
> > your series is not applying. Please refresh it against staging-testing
>
> Applies to staging-testing for me. Are you sure you're applying the
> correct 'RESEND 2' patches?
i think. if you do git log drivers/staging/sm750fb/
are you getting the first patch author as
Ragavendra Nagraj <ragavendra.bn@gmail.com> ?
regards
sudip
>
> --
> Lorenzo Stoakes
> https:/ljs.io
^ permalink raw reply
* Re: [PATCH 0/13] staging: sm750: reformat sm750.c
From: tofu @ 2015-03-23 13:48 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <20150322230718.GA16751@x230-arch.club.entropia.de>
On 03/23/2015 02:11 PM, Sudip Mukherjee wrote:
> On Mon, Mar 23, 2015 at 02:20:05PM +0300, Dan Carpenter wrote:
>> These are going to conflict with Lorenzo's patches.
>
> i just checked and informed Lorenzo that his patchset is not applying
> to staging-testing, and this patchset also is not applying. Greg has
> already applied patches of Raghavendra and Ricardo Ribalda Delgado.
>
> Michel - please refresh your patchset against staging-testing after
> making the changes that Dan has suggested.
I'll update it tonight and rebase it to staging-testing.
regards
Michel v.C.
>
> regards
> sudip
>
>>
>> regards,
>> dan carpenter
>>
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
* Re: [PATCH RESEND 2 1/5] staging: sm750fb: Use memset_io instead of memset
From: Sudip Mukherjee @ 2015-03-23 13:55 UTC (permalink / raw)
To: Lorenzo Stoakes
Cc: Dan Carpenter, devel, linux-fbdev, Teddy Wang, Greg KH,
linux-kernel
In-Reply-To: <CAA5enKYeq8id8s+w+AA1e0haZci9ZEXj+3VSPdm_=Uy7vbHOFQ@mail.gmail.com>
On Mon, Mar 23, 2015 at 01:25:37PM +0000, Lorenzo Stoakes wrote:
> On 23 March 2015 at 13:21, Lorenzo Stoakes <lstoakes@gmail.com> wrote:
> > Sigh. Checking the emails I actually sent, I seem to *somehow* have
> > sent old files in this resend :S I really don't know how this
> > happened. My copies of the patches all apply perfectly correctly, but
> > these are not the ones I sent.
>
> And just to add to my embarrassment, this is actually *not* the case,
> they DO all apply, gmail mangled the patches. So they seem fine after
> all!
>
> Sudip - could you try to carefully grab each of the 5 patches with
> [RESEND 2] in the subject to make sure you are applying them
> correctly?
my apologies. they are applying properly. i had them already applied
for testing that hardware change, and again i tried to apply them.
sorry for the confusion. :(
regards
sudip
>
> Best,
>
> --
> Lorenzo Stoakes
> https:/ljs.io
^ permalink raw reply
* Re: [PATCH RESEND 2 1/5] staging: sm750fb: Use memset_io instead of memset
From: Sudip Mukherjee @ 2015-03-23 13:55 UTC (permalink / raw)
To: Lorenzo Stoakes; +Cc: teddy.wang, gregkh, linux-fbdev, devel, linux-kernel
In-Reply-To: <1426864935-29350-1-git-send-email-lstoakes@gmail.com>
On Fri, Mar 20, 2015 at 03:22:11PM +0000, Lorenzo Stoakes wrote:
> This patch takes into account that cursor->vstart, crtc->vScreen and
> share->pvMem are pointers to memory-mapped I/O and thus we should use memset_io
> to make this explicit. In addition, some architectures require special treatment
> of memory-mapped I/O so the previous code could actually break without this
> change.
sorry for the confusion.
tested the whole series on hardware.
Tested-by: Sudip Mukherjee <sudip@vectorindia.org>
sudip
^ permalink raw reply
* Re: [PATCH 0/13] staging: sm750: reformat sm750.c
From: Sudip Mukherjee @ 2015-03-23 14:19 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <20150322230718.GA16751@x230-arch.club.entropia.de>
On Mon, Mar 23, 2015 at 02:48:03PM +0100, tofu wrote:
> On 03/23/2015 02:11 PM, Sudip Mukherjee wrote:
> > On Mon, Mar 23, 2015 at 02:20:05PM +0300, Dan Carpenter wrote:
> >> These are going to conflict with Lorenzo's patches.
> >
> > i just checked and informed Lorenzo that his patchset is not applying
> > to staging-testing, and this patchset also is not applying. Greg has
> > already applied patches of Raghavendra and Ricardo Ribalda Delgado.
> >
> > Michel - please refresh your patchset against staging-testing after
> > making the changes that Dan has suggested.
> I'll update it tonight and rebase it to staging-testing.
my apologies. your patchset is applying properly, but it is not
applying if i apply Lorenzo's patches first. And in all probability
Greg will apply that first as that has reached his inbox first.
so better will be if you apply Lorenzo's patches to your tree and
then prepare your patches and just write a small comment in your
patch that your patchset depends on the patchset sent by Lorenzo.
regards
sudip
^ permalink raw reply
* Re: [PATCH v1 05/47] pci: add pci_iomap_wc() variants
From: Bjorn Helgaas @ 2015-03-23 17:20 UTC (permalink / raw)
To: Luis R. Rodriguez
Cc: Andy Lutomirski, Ingo Molnar, Thomas Gleixner, H. Peter Anvin,
jgross, Jan Beulich, Borislav Petkov, Suresh Siddha,
venkatesh.pallipadi, Dave Airlie, linux-kernel@vger.kernel.org,
linux-fbdev, x86@kernel.org, xen-devel@lists.xenproject.org,
Luis R. Rodriguez, Ingo Molnar, Daniel Vetter, Antonino Daplas,
Jean-Christophe Plagniol-Villard, Tomi Valkeinen, Dave Hansen,
Arnd Bergmann, Michael S. Tsirkin, Stefan Bader,
Konrad Rzeszutek Wilk, Ville Syrjälä, David Vrabel,
Toshi Kani, Roger Pau Monné, xen-devel
In-Reply-To: <1426893517-2511-6-git-send-email-mcgrof@do-not-panic.com>
Hi Luis,
This seems OK to me, but I'm curious about a few things.
On Fri, Mar 20, 2015 at 6:17 PM, Luis R. Rodriguez
<mcgrof@do-not-panic.com> wrote:
> From: "Luis R. Rodriguez" <mcgrof@suse.com>
>
> This allows drivers to take advantage of write-combining
> when possible. Ideally we'd have pci_read_bases() just
> peg an IORESOURCE_WC flag for us
We do set IORESOURCE_PREFETCH. Do you mean something different?
> but where exactly
> video devices memory lie varies *largely* and at times things
> are mixed with MMIO registers, sometimes we can address
> the changes in drivers, other times the change requires
> intrusive changes.
What does a video device address have to do with this? I do see that
if a BAR maps only a frame buffer, the device might be able to mark it
prefetchable, while if the BAR mapped both a frame buffer and some
registers, it might not be able to make it prefetchable. But that
doesn't seem like it depends on the *address*.
pci_iomap_range() already makes a cacheable mapping if
IORESOURCE_CACHEABLE; I'm guessing that you would like it to
automatically use WC if the BAR if IORESOURCE_PREFETCH, e.g.,
if (flags & IORESOURCE_CACHEABLE)
return ioremap(start, len);
if (flags & IORESOURCE_PREFETCH)
return ioremap_wc(start, len);
return ioremap_nocache(start, len);
Is there a reason not to do that?
> Although there is also arch_phys_wc_add() that makes use of
> architecture specific write-combinging alternatives (MTRR on
> x86 when a system does not have PAT) we void polluting
> pci_iomap() space with it and force drivers and subsystems
> that want to use it to be explicit.
>
> There are a few motivations for this:
>
> a) Take advantage of PAT when available
>
> b) Help bury MTRR code away, MTRR is architecture specific and on
> x86 its replaced by PAT
>
> c) Help with the goal of eventually using _PAGE_CACHE_UC over
> _PAGE_CACHE_UC_MINUS on x86 on ioremap_nocache() (de33c442e)
> ...
> +void __iomem *pci_iomap_wc_range(struct pci_dev *dev,
> + int bar,
> + unsigned long offset,
> + unsigned long maxlen)
> +{
> + resource_size_t start = pci_resource_start(dev, bar);
> + resource_size_t len = pci_resource_len(dev, bar);
> + unsigned long flags = pci_resource_flags(dev, bar);
> +
> + if (len <= offset || !start)
> + return NULL;
> + len -= offset;
> + start += offset;
> + if (maxlen && len > maxlen)
> + len = maxlen;
> + if (flags & IORESOURCE_IO)
> + return __pci_ioport_map(dev, start, len);
> + if (flags & IORESOURCE_MEM)
Should we log a note in dmesg if the BAR is *not* IORESOURCE_PREFETCH?
I know the driver might know it's safe even if the device didn't mark
the BAR as prefetchable, but it does seem like an easy way for a
driver to shoot itself in the foot.
> + return ioremap_wc(start, len);
> + /* What? */
> + return NULL;
> +}
^ permalink raw reply
* [PATCH 1/2] staging: sm7xxfb: start using module parameters
From: Sudip Mukherjee @ 2015-03-24 4:50 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Sudip Mukherjee, linux-fbdev, devel, linux-kernel
add module parameters so that we can configure X and Y resolutions
and bpp when using this driver as a module.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
drivers/staging/sm7xxfb/sm7xxfb.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/drivers/staging/sm7xxfb/sm7xxfb.c b/drivers/staging/sm7xxfb/sm7xxfb.c
index abdb021..6e9b2aa 100644
--- a/drivers/staging/sm7xxfb/sm7xxfb.c
+++ b/drivers/staging/sm7xxfb/sm7xxfb.c
@@ -1033,6 +1033,24 @@ static int __init sm712fb_init(void)
module_init(sm712fb_init);
+module_param(mode_option, charp, S_IRUGO);
+
+MODULE_PARM_DESC(mode_option, "\n\t\tOptions:\n"
+ "\t\t0x301 = 640x480-8\n"
+ "\t\t0x303 = 800x600-8\n"
+ "\t\t0x305 = 1024x768-8\n"
+ "\t\t0x307 = 1280x1024-8\n"
+ "\t\t0x311 = 640x480-16\n"
+ "\t\t0x314 = 800x600-16\n"
+ "\t\t0x317 = 1024x768-16\n"
+ "\t\t0x31A = 1280x1024-16\n"
+ "\t\t0x312 = 640x480-24\n"
+ "\t\t0x315 = 800x600-24\n"
+ "\t\t0x318 = 1024x768-24\n"
+ "\t\t0x31B = 1280x1024-24\n"
+ "\t\tUsual example:\n"
+ "\t\tinsmod ./sm7xxfb.ko mode_option=\"0x301\"\n");
+
static void __exit sm712fb_exit(void)
{
pci_unregister_driver(&smtcfb_driver);
--
1.8.1.2
^ permalink raw reply related
* [PATCH 2/2] staging: sm7xxfb: add MODULE_DEVICE_TABLE
From: Sudip Mukherjee @ 2015-03-24 4:50 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Sudip Mukherjee, linux-fbdev, devel, linux-kernel
In-Reply-To: <1427172609-4318-1-git-send-email-sudipm.mukherjee@gmail.com>
add MODULE_DEVICE_TABLE to support hot-plugging.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
drivers/staging/sm7xxfb/sm7xxfb.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/sm7xxfb/sm7xxfb.c b/drivers/staging/sm7xxfb/sm7xxfb.c
index 6e9b2aa..15509a6 100644
--- a/drivers/staging/sm7xxfb/sm7xxfb.c
+++ b/drivers/staging/sm7xxfb/sm7xxfb.c
@@ -922,6 +922,8 @@ static const struct pci_device_id smtcfb_pci_table[] = {
{0,}
};
+MODULE_DEVICE_TABLE(pci, smtcfb_pci_table);
+
static void smtcfb_pci_remove(struct pci_dev *pdev)
{
struct smtcfb_info *sfb;
--
1.8.1.2
^ permalink raw reply related
* [PATCH] staging: sm750fb: Fixed C99 comments warnings
From: Ragavendra Nagraj @ 2015-03-24 4:51 UTC (permalink / raw)
To: sudipm.mukherjee, teddy.wang, gregkh, linux-fbdev, devel,
linux-kernel
This patch fixes the C99-style "// ..." comments warnings identified by the
checkpath.pl script for the entire ddk750_chip.c file by using the
appropriate C89 "/* ... */" style comments accordingly.
Signed-off-by: Ragavendra Nagraj <ragavendra.bn@gmail.com>
---
drivers/staging/sm750fb/ddk750_chip.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/sm750fb/ddk750_chip.c b/drivers/staging/sm750fb/ddk750_chip.c
index 02f9326..1fb00a4 100644
--- a/drivers/staging/sm750fb/ddk750_chip.c
+++ b/drivers/staging/sm750fb/ddk750_chip.c
@@ -17,7 +17,7 @@ logical_chip_type_t getChipType(void)
char physicalRev;
logical_chip_type_t chip;
- physicalID = devId750;//either 0x718 or 0x750
+ physicalID = devId750;/*either 0x718 or 0x750*/
physicalRev = revId750;
if (physicalID = 0x718)
@@ -264,7 +264,7 @@ int ddk750_initHw(initchip_param_t * pInitParam)
unsigned int ulReg;
#if 0
- //move the code to map regiter function.
+ /*move the code to map regiter function.*/
if(getChipType() = SM718){
/* turn on big endian bit*/
ulReg = PEEK32(0x74);
@@ -501,7 +501,7 @@ unsigned int calcPllValue(unsigned int request_orig,pll_value_t *pll)
}
}
- //printk("Finally: pll->n[%lu],m[%lu],od[%lu],pod[%lu]\n",pll->N,pll->M,pll->OD,pll->POD);
+ /*printk("Finally: pll->n[%lu],m[%lu],od[%lu],pod[%lu]\n",pll->N,pll->M,pll->OD,pll->POD);*/
return ret;
}
@@ -597,13 +597,13 @@ pll_value_t *pPLL /* Structure to hold the value to be set in PLL */
}
/* Restore input frequency from Khz to hz unit */
-// pPLL->inputFreq *= 1000;
+/* pPLL->inputFreq *= 1000;*/
ulRequestClk *= 1000;
pPLL->inputFreq = DEFAULT_INPUT_CLOCK; /* Default reference clock */
/* Output debug information */
- //DDKDEBUGPRINT((DISPLAY_LEVEL, "calcPllValue: Requested Frequency = %d\n", ulRequestClk));
- //DDKDEBUGPRINT((DISPLAY_LEVEL, "calcPllValue: Input CLK = %dHz, M=%d, N=%d, OD=%d, POD=%d\n", pPLL->inputFreq, pPLL->M, pPLL->N, pPLL->OD, pPLL->POD));
+ /*DDKDEBUGPRINT((DISPLAY_LEVEL, "calcPllValue: Requested Frequency = %d\n", ulRequestClk));*/
+ /*DDKDEBUGPRINT((DISPLAY_LEVEL, "calcPllValue: Input CLK = %dHz, M=%d, N=%d, OD=%d, POD=%d\n", pPLL->inputFreq, pPLL->M, pPLL->N, pPLL->OD, pPLL->POD));*/
/* Return actual frequency that the PLL can set */
ret = calcPLL(pPLL);
--
1.7.10.4
^ permalink raw reply related
* Re: [PATCH] staging: sm750fb: Fixed C99 comments warnings
From: Dan Carpenter @ 2015-03-24 7:57 UTC (permalink / raw)
To: Ragavendra Nagraj
Cc: sudipm.mukherjee, teddy.wang, gregkh, linux-fbdev, devel,
linux-kernel
In-Reply-To: <20150324045154.GA12298@localhost.localdomain>
On Mon, Mar 23, 2015 at 09:51:54PM -0700, Ragavendra Nagraj wrote:
> diff --git a/drivers/staging/sm750fb/ddk750_chip.c b/drivers/staging/sm750fb/ddk750_chip.c
> index 02f9326..1fb00a4 100644
> --- a/drivers/staging/sm750fb/ddk750_chip.c
> +++ b/drivers/staging/sm750fb/ddk750_chip.c
> @@ -17,7 +17,7 @@ logical_chip_type_t getChipType(void)
> char physicalRev;
> logical_chip_type_t chip;
>
> - physicalID = devId750;//either 0x718 or 0x750
> + physicalID = devId750;/*either 0x718 or 0x750*/
This should be:
physicalID = devId750; /* either 0x718 or 0x750 */
> @@ -501,7 +501,7 @@ unsigned int calcPllValue(unsigned int request_orig,pll_value_t *pll)
> }
> }
>
> - //printk("Finally: pll->n[%lu],m[%lu],od[%lu],pod[%lu]\n",pll->N,pll->M,pll->OD,pll->POD);
> + /*printk("Finally: pll->n[%lu],m[%lu],od[%lu],pod[%lu]\n",pll->N,pll->M,pll->OD,pll->POD);*/
Just delete this dead code.
Please redo.
regards,
dan carpenter
^ permalink raw reply
* Re: [PATCH 1/2] staging: sm7xxfb: start using module parameters
From: Greg Kroah-Hartman @ 2015-03-24 9:48 UTC (permalink / raw)
To: Sudip Mukherjee; +Cc: devel, linux-fbdev, linux-kernel
In-Reply-To: <1427172609-4318-1-git-send-email-sudipm.mukherjee@gmail.com>
On Tue, Mar 24, 2015 at 10:20:08AM +0530, Sudip Mukherjee wrote:
> add module parameters so that we can configure X and Y resolutions
> and bpp when using this driver as a module.
>
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> ---
> drivers/staging/sm7xxfb/sm7xxfb.c | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/drivers/staging/sm7xxfb/sm7xxfb.c b/drivers/staging/sm7xxfb/sm7xxfb.c
> index abdb021..6e9b2aa 100644
> --- a/drivers/staging/sm7xxfb/sm7xxfb.c
> +++ b/drivers/staging/sm7xxfb/sm7xxfb.c
> @@ -1033,6 +1033,24 @@ static int __init sm712fb_init(void)
>
> module_init(sm712fb_init);
>
> +module_param(mode_option, charp, S_IRUGO);
> +
> +MODULE_PARM_DESC(mode_option, "\n\t\tOptions:\n"
> + "\t\t0x301 = 640x480-8\n"
> + "\t\t0x303 = 800x600-8\n"
> + "\t\t0x305 = 1024x768-8\n"
> + "\t\t0x307 = 1280x1024-8\n"
> + "\t\t0x311 = 640x480-16\n"
> + "\t\t0x314 = 800x600-16\n"
> + "\t\t0x317 = 1024x768-16\n"
> + "\t\t0x31A = 1280x1024-16\n"
> + "\t\t0x312 = 640x480-24\n"
> + "\t\t0x315 = 800x600-24\n"
> + "\t\t0x318 = 1024x768-24\n"
> + "\t\t0x31B = 1280x1024-24\n"
> + "\t\tUsual example:\n"
> + "\t\tinsmod ./sm7xxfb.ko mode_option=\"0x301\"\n");
> +
That's funny :)
And how do you handle multiple devices in the system?
:(
Seriously, never use module parameters for device parameters, they are
two different things. The framebuffer core has options for handling
modes, why not use them?
And yes, lots of framebuffer drivers do have crazy module parameters,
but that doesn't mean you have to perpetuate the insanity, please do
things properly here.
thanks,
greg k-h
^ permalink raw reply
* Re: [PATCH 1/2] staging: sm7xxfb: start using module parameters
From: Greg Kroah-Hartman @ 2015-03-24 10:40 UTC (permalink / raw)
To: Sudip Mukherjee; +Cc: devel, linux-fbdev, linux-kernel
In-Reply-To: <20150324102835.GA7986@sudip-PC>
On Tue, Mar 24, 2015 at 03:58:35PM +0530, Sudip Mukherjee wrote:
> On Tue, Mar 24, 2015 at 10:48:26AM +0100, Greg Kroah-Hartman wrote:
> > On Tue, Mar 24, 2015 at 10:20:08AM +0530, Sudip Mukherjee wrote:
> > > + "\t\t0x31B = 1280x1024-24\n"
> > > + "\t\tUsual example:\n"
> > > + "\t\tinsmod ./sm7xxfb.ko mode_option=\"0x301\"\n");
> > > +
> >
> > That's funny :)
> >
> > And how do you handle multiple devices in the system?
> frankly speaking, never got the idea about multiple devices.
>
> >
> > :(
> >
> > Seriously, never use module parameters for device parameters, they are
> > two different things. The framebuffer core has options for handling
> > modes, why not use them?
> >
> > And yes, lots of framebuffer drivers do have crazy module parameters,
> > but that doesn't mean you have to perpetuate the insanity, please do
> > things properly here.
> i am learning from other framebuffer drivers. i guess i should only
> see at skeletonfb.c and not the others.
> please drop this 1/2 patch, do i need to resend the 2/2 which adds
> the MODULE_DEVICE_TABLE ?
Please do, it's long gone from my queue.
^ permalink raw reply
* Re: [PATCH 1/2] staging: sm7xxfb: start using module parameters
From: Sudip Mukherjee @ 2015-03-24 10:40 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: devel, linux-fbdev, linux-kernel
In-Reply-To: <20150324094826.GB6378@kroah.com>
On Tue, Mar 24, 2015 at 10:48:26AM +0100, Greg Kroah-Hartman wrote:
> On Tue, Mar 24, 2015 at 10:20:08AM +0530, Sudip Mukherjee wrote:
> > + "\t\t0x31B = 1280x1024-24\n"
> > + "\t\tUsual example:\n"
> > + "\t\tinsmod ./sm7xxfb.ko mode_option=\"0x301\"\n");
> > +
>
> That's funny :)
>
> And how do you handle multiple devices in the system?
frankly speaking, never got the idea about multiple devices.
>
> :(
>
> Seriously, never use module parameters for device parameters, they are
> two different things. The framebuffer core has options for handling
> modes, why not use them?
>
> And yes, lots of framebuffer drivers do have crazy module parameters,
> but that doesn't mean you have to perpetuate the insanity, please do
> things properly here.
i am learning from other framebuffer drivers. i guess i should only
see at skeletonfb.c and not the others.
please drop this 1/2 patch, do i need to resend the 2/2 which adds
the MODULE_DEVICE_TABLE ?
regards
sudip
>
> thanks,
>
> greg k-h
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox