Re: [PATCH 07/13] drm/via: Remove unecessary NULL check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

On Sat, Apr 5, 2014 at 11:44 AM, Daniel Vetter <daniel.vetter@xxxxxxxx> wrote:
> The context_dtor callback is only called once we've successfully loaded
> the driver, which means dev->dev_private is set up. The check is hence
> pointless.
>
> Also dev->dev_private is deref already above, so compilers are free
> to elide it anyway.

Are you sure compilers can assume "*ptr" implies "ptr != NULL"? I
doubt that and depending on CONFIG_DEFAULT_MMAP_MIN_ADDR I think you
can even build user-space that can successfully mmap(MAP_FIXED) at
address 0. Anyhow, I guess no-one cares besides me, so patch looks
good :)

Thanks
David
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux