lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 13 Jan 2015 23:49:51 +0100
From:	Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
To:	Ben Skeggs <skeggsb@...il.com>
Cc:	David Airlie <airlied@...ux.ie>, Ben Skeggs <bskeggs@...hat.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>
Subject: Re: [PATCH] gpu: drm: nouveau: nvif: device: Remove unused function

2015-01-12 0:13 GMT+01:00 Ben Skeggs <skeggsb@...il.com>:
> On Sun, Jan 11, 2015 at 11:53 PM, Rickard Strandqvist
> <rickard_strandqvist@...ctrumdigital.se> wrote:
>
> Hey Rickard,
>
>> Remove the function nvif_device_new() that is not used anywhere.
> It's used, just not by the kernel.  All the code under core/ and nvif/
> is also built into a userspace library (not in the kernel tree,
> obviously) and used by tools / testing apps.
>
> I'll pick up the rest of your nouveau patches though, aside from the
> one Samuel is taking care of.
>
> Thanks,
> Ben.
>
>>
>> This was partially found by using a static code analysis program called cppcheck.
>>
>> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
>> ---
>>  drivers/gpu/drm/nouveau/nvif/device.c |   18 ------------------
>>  drivers/gpu/drm/nouveau/nvif/device.h |    2 --
>>  2 files changed, 20 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/nouveau/nvif/device.c b/drivers/gpu/drm/nouveau/nvif/device.c
>> index f477579..8522aa9 100644
>> --- a/drivers/gpu/drm/nouveau/nvif/device.c
>> +++ b/drivers/gpu/drm/nouveau/nvif/device.c
>> @@ -53,24 +53,6 @@ nvif_device_del(struct nvif_device *device)
>>         kfree(device);
>>  }
>>
>> -int
>> -nvif_device_new(struct nvif_object *parent, u32 handle, u32 oclass,
>> -               void *data, u32 size, struct nvif_device **pdevice)
>> -{
>> -       struct nvif_device *device = kzalloc(sizeof(*device), GFP_KERNEL);
>> -       if (device) {
>> -               int ret = nvif_device_init(parent, nvif_device_del, handle,
>> -                                          oclass, data, size, device);
>> -               if (ret) {
>> -                       kfree(device);
>> -                       device = NULL;
>> -               }
>> -               *pdevice = device;
>> -               return ret;
>> -       }
>> -       return -ENOMEM;
>> -}
>> -
>>  void
>>  nvif_device_ref(struct nvif_device *device, struct nvif_device **pdevice)
>>  {
>> diff --git a/drivers/gpu/drm/nouveau/nvif/device.h b/drivers/gpu/drm/nouveau/nvif/device.h
>> index 43180f9..8440848 100644
>> --- a/drivers/gpu/drm/nouveau/nvif/device.h
>> +++ b/drivers/gpu/drm/nouveau/nvif/device.h
>> @@ -22,8 +22,6 @@ int  nvif_device_init(struct nvif_object *, void (*dtor)(struct nvif_device *),
>>                       u32 handle, u32 oclass, void *, u32,
>>                       struct nvif_device *);
>>  void nvif_device_fini(struct nvif_device *);
>> -int  nvif_device_new(struct nvif_object *, u32 handle, u32 oclass,
>> -                    void *, u32, struct nvif_device **);
>>  void nvif_device_ref(struct nvif_device *, struct nvif_device **);
>>
>>  /*XXX*/
>> --
>> 1.7.10.4
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@...ts.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel


Hi Ben

Okay, thanks good to know.


Kind regards
Rickard Strandqvist
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ