[PATCH v4 05/45] drm/connector: Check drm_connector_init pointers arguments
Pekka Paalanen
ppaalanen at gmail.com
Wed Nov 29 02:12:59 PST 2023
On Tue, 28 Nov 2023 15:49:08 +0200
Ville Syrjälä <ville.syrjala at linux.intel.com> wrote:
> Should we perhaps start to use the (arguably hideous)
> - void f(struct foo *bar)
> + void f(struct foo bar[static 1])
> syntax to tell the compiler we don't accept NULL pointers?
>
> Hmm. Apparently that has the same problem as using any
> other kind of array syntax in the prototype. That is,
> the compiler demands to know the definition of 'struct foo'
> even though we're passing in effectively a pointer. Sigh.
__attribute__((nonnull)) ?
Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20231129/7f91a812/attachment.sig>
More information about the linux-arm-kernel
mailing list