Vince Hsu
2014-Dec-23 01:37 UTC
[Nouveau] [PATCH V2 2/4] pwr: make nouveau_pwr_pgob() non-static
On 12/22/2014 05:11 PM, Vince Hsu wrote:> The platform device does not use the common nouveau_pwr_init() to initialize > the PWR, but it does need the .prob() be assigned to avoid NULL pointer > dereference in graph/nve4.c.s/prob/pgob/ :-( Will fix in next version.> > Signed-off-by: Vince Hsu <vinceh at nvidia.com> > --- > > v2: this patch is added since v2. (v1 is the RFC actually) > > nvkm/subdev/pwr/base.c | 2 +- > nvkm/subdev/pwr/priv.h | 1 + > 2 files changed, 2 insertions(+), 1 deletion(-) > > diff --git a/nvkm/subdev/pwr/base.c b/nvkm/subdev/pwr/base.c > index 0ab55f27ec45..1ea433a5e118 100644 > --- a/nvkm/subdev/pwr/base.c > +++ b/nvkm/subdev/pwr/base.c > @@ -26,7 +26,7 @@ > > #include "priv.h" > > -static void > +void > nouveau_pwr_pgob(struct nouveau_pwr *ppwr, bool enable) > { > const struct nvkm_pwr_impl *impl = (void *)nv_oclass(ppwr); > diff --git a/nvkm/subdev/pwr/priv.h b/nvkm/subdev/pwr/priv.h > index 3814a341db32..86149d9a440c 100644 > --- a/nvkm/subdev/pwr/priv.h > +++ b/nvkm/subdev/pwr/priv.h > @@ -26,6 +26,7 @@ int _nouveau_pwr_ctor(struct nouveau_object *, struct nouveau_object *, > #define _nouveau_pwr_dtor _nouveau_subdev_dtor > int _nouveau_pwr_init(struct nouveau_object *); > int _nouveau_pwr_fini(struct nouveau_object *, bool); > +void nouveau_pwr_pgob(struct nouveau_pwr *ppwr, bool enable); > > struct nvkm_pwr_impl { > struct nouveau_oclass base;----------------------------------------------------------------------------------- This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. -----------------------------------------------------------------------------------
Ben Skeggs
2015-Jan-04 22:29 UTC
[Nouveau] [PATCH V2 2/4] pwr: make nouveau_pwr_pgob() non-static
On Tue, Dec 23, 2014 at 11:37 AM, Vince Hsu <vinceh at nvidia.com> wrote:> > On 12/22/2014 05:11 PM, Vince Hsu wrote: >> >> The platform device does not use the common nouveau_pwr_init() to >> initialize >> the PWR, but it does need the .prob() be assigned to avoid NULL pointer >> dereference in graph/nve4.c. > > s/prob/pgob/ :-( > Will fix in next version.Is this the only change you need for a next version? If so, I can modify the commit message myself when I merge it.> >> >> Signed-off-by: Vince Hsu <vinceh at nvidia.com> >> --- >> >> v2: this patch is added since v2. (v1 is the RFC actually) >> >> nvkm/subdev/pwr/base.c | 2 +- >> nvkm/subdev/pwr/priv.h | 1 + >> 2 files changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/nvkm/subdev/pwr/base.c b/nvkm/subdev/pwr/base.c >> index 0ab55f27ec45..1ea433a5e118 100644 >> --- a/nvkm/subdev/pwr/base.c >> +++ b/nvkm/subdev/pwr/base.c >> @@ -26,7 +26,7 @@ >> #include "priv.h" >> -static void >> +void >> nouveau_pwr_pgob(struct nouveau_pwr *ppwr, bool enable) >> { >> const struct nvkm_pwr_impl *impl = (void *)nv_oclass(ppwr); >> diff --git a/nvkm/subdev/pwr/priv.h b/nvkm/subdev/pwr/priv.h >> index 3814a341db32..86149d9a440c 100644 >> --- a/nvkm/subdev/pwr/priv.h >> +++ b/nvkm/subdev/pwr/priv.h >> @@ -26,6 +26,7 @@ int _nouveau_pwr_ctor(struct nouveau_object *, struct >> nouveau_object *, >> #define _nouveau_pwr_dtor _nouveau_subdev_dtor >> int _nouveau_pwr_init(struct nouveau_object *); >> int _nouveau_pwr_fini(struct nouveau_object *, bool); >> +void nouveau_pwr_pgob(struct nouveau_pwr *ppwr, bool enable); >> struct nvkm_pwr_impl { >> struct nouveau_oclass base; > > > > ----------------------------------------------------------------------------------- > This email message is for the sole use of the intended recipient(s) and may > contain > confidential information. Any unauthorized review, use, disclosure or > distribution > is prohibited. If you are not the intended recipient, please contact the > sender by > reply email and destroy all copies of the original message. > ----------------------------------------------------------------------------------- > > _______________________________________________ > Nouveau mailing list > Nouveau at lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/nouveau
Vince Hsu
2015-Jan-05 01:30 UTC
[Nouveau] [PATCH V2 2/4] pwr: make nouveau_pwr_pgob() non-static
Hi, On 01/05/2015 06:29 AM, Ben Skeggs wrote:> On Tue, Dec 23, 2014 at 11:37 AM, Vince Hsu <vinceh at nvidia.com> wrote: >> On 12/22/2014 05:11 PM, Vince Hsu wrote: >>> The platform device does not use the common nouveau_pwr_init() to >>> initialize >>> the PWR, but it does need the .prob() be assigned to avoid NULL pointer >>> dereference in graph/nve4.c. >> s/prob/pgob/ :-( >> Will fix in next version. > Is this the only change you need for a next version? If so, I can > modify the commit message myself when I merge it.Yes if no one has objection to this patchset. :) Thanks, Vince> >>> Signed-off-by: Vince Hsu <vinceh at nvidia.com> >>> --- >>> >>> v2: this patch is added since v2. (v1 is the RFC actually) >>> >>> nvkm/subdev/pwr/base.c | 2 +- >>> nvkm/subdev/pwr/priv.h | 1 + >>> 2 files changed, 2 insertions(+), 1 deletion(-) >>> >>> diff --git a/nvkm/subdev/pwr/base.c b/nvkm/subdev/pwr/base.c >>> index 0ab55f27ec45..1ea433a5e118 100644 >>> --- a/nvkm/subdev/pwr/base.c >>> +++ b/nvkm/subdev/pwr/base.c >>> @@ -26,7 +26,7 @@ >>> #include "priv.h" >>> -static void >>> +void >>> nouveau_pwr_pgob(struct nouveau_pwr *ppwr, bool enable) >>> { >>> const struct nvkm_pwr_impl *impl = (void *)nv_oclass(ppwr); >>> diff --git a/nvkm/subdev/pwr/priv.h b/nvkm/subdev/pwr/priv.h >>> index 3814a341db32..86149d9a440c 100644 >>> --- a/nvkm/subdev/pwr/priv.h >>> +++ b/nvkm/subdev/pwr/priv.h >>> @@ -26,6 +26,7 @@ int _nouveau_pwr_ctor(struct nouveau_object *, struct >>> nouveau_object *, >>> #define _nouveau_pwr_dtor _nouveau_subdev_dtor >>> int _nouveau_pwr_init(struct nouveau_object *); >>> int _nouveau_pwr_fini(struct nouveau_object *, bool); >>> +void nouveau_pwr_pgob(struct nouveau_pwr *ppwr, bool enable); >>> struct nvkm_pwr_impl { >>> struct nouveau_oclass base; >> >> >> ----------------------------------------------------------------------------------- >> This email message is for the sole use of the intended recipient(s) and may >> contain >> confidential information. Any unauthorized review, use, disclosure or >> distribution >> is prohibited. If you are not the intended recipient, please contact the >> sender by >> reply email and destroy all copies of the original message. >> ----------------------------------------------------------------------------------- >> >> _______________________________________________ >> Nouveau mailing list >> Nouveau at lists.freedesktop.org >> http://lists.freedesktop.org/mailman/listinfo/nouveau
Maybe Matching Threads
- [PATCH V2 2/4] pwr: make nouveau_pwr_pgob() non-static
- [PATCH V2 2/4] pwr: make nouveau_pwr_pgob() non-static
- [PATCH V2 1/4] clk: allow non-blocking for nouveau_clock_astate()
- [PATCH 3/8] pwr/memx: Make FB disable and enable explicit
- [PATCH 2/7] fb/ramnva3: Link training for DDR3