]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
net/connector: Add const qualifier to cb_id
authorGeoff Levand <geoff@infradead.org>
Tue, 15 Dec 2020 05:15:47 +0000 (21:15 -0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 16 Dec 2020 19:06:49 +0000 (11:06 -0800)
commitc18e68696fdd9fd293f051030bce5aaff3c9b185
tree5a1b9720ff2503554377e8c3d7cc9966400f4d6f
parent4375ada01963d1ebf733d60d1bb6e5db401e1ac6
net/connector: Add const qualifier to cb_id

The connector driver never modifies any cb_id passed to it, so add a const
qualifier to those arguments so callers can declare their struct cb_id as a
constant object.

Fixes build warnings like these when passing a constant struct cb_id:

  warning: passing argument 1 of ‘cn_add_callback’ discards ‘const’ qualifier from pointer target

Signed-off-by: Geoff Levand <geoff@infradead.org>
Link: https://lore.kernel.org/r/a9e49c9e-67fa-16e7-0a6b-72f6bd30c58a@infradead.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Documentation/driver-api/connector.rst
drivers/connector/cn_queue.c
drivers/connector/connector.c
include/linux/connector.h