mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
ipc: delete seq_max field in struct ipc_ids
This field is only used to reset the ids seq number if it exceeds the smaller of INT_MAX/SEQ_MULTIPLIER and USHRT_MAX, and can therefore be moved out of the structure and into its own macro. Since each ipc_namespace contains a table of 3 pointers to struct ipc_ids we can save space in instruction text: text data bss dec hex filename 56232 2348 24 58604 e4ec ipc/built-in.o 56216 2348 24 58588 e4dc ipc/built-in.o-after Signed-off-by: Davidlohr Bueso <[email protected]> Reviewed-by: Jonathan Gonzalez <[email protected]> Cc: Aswin Chandramouleeswaran <[email protected]> Cc: Rik van Riel <[email protected]> Acked-by: Manfred Spraul <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
8dc5cd04f9
commit
daf948c7d1
3 changed files with 3 additions and 12 deletions
|
|
@ -100,6 +100,7 @@ void __init ipc_init_proc_interface(const char *path, const char *header,
|
|||
|
||||
#define ipcid_to_idx(id) ((id) % SEQ_MULTIPLIER)
|
||||
#define ipcid_to_seqx(id) ((id) / SEQ_MULTIPLIER)
|
||||
#define IPCID_SEQ_MAX min_t(int, INT_MAX/SEQ_MULTIPLIER, USHRT_MAX)
|
||||
|
||||
/* must be called with ids->rwsem acquired for writing */
|
||||
int ipc_addid(struct ipc_ids *, struct kern_ipc_perm *, int);
|
||||
|
|
|
|||
Loading…
Reference in a new issue