[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1418660317-21750-1-git-send-email-martink@posteo.de>
Date: Mon, 15 Dec 2014 17:18:31 +0100
From: Martin Kepplinger <martink@...teo.de>
To: peterz@...radead.org
Cc: mingo@...nel.org, tytso@....edu, linux-kernel@...r.kernel.org
Subject: add sign-extend functions for 8 and 16 bit values
In short: If you want the first 2 changes, please merge them and notify
me.
This adds sign_extend8() and sign_extend16() for the quite many cases
where this is needed, like sign_extend32().
Sign-extending is done in a few different ways throughout the kernel
and most of them look not very beautiful, adding non-obvious constant
values. This would simplify things.
I append four example changes for existing drivers. I'm aware that you
are not resposible for these, but I'd post them to the relevant
maintainers only if you want to apply to bitops.h.
While I would definitely move on moving drivers over to this, when I find
them, I can't guarantee I'd change every sign-extension out there myself.
--
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