There are multiple instances of code reading an optional unsigned
parameter from Xenstore via xenbus_scanf(). Instead of repeating the
same code over and over add a service function doing the job and
replace the call of xenbus_scanf() with the call of the new function
where appropriate.
Juergen Gross (12):
xen: introduce xenbus_read_unsigned()
xen: make use of xenbus_read_unsigned() in xen-blkback
xen: make use of xenbus_read_unsigned() in xen-blkfront
xen: make use of xenbus_read_unsigned() in xen-tpmfront
xen: make use of xenbus_read_unsigned() in xen-kbdfront
xen: make use of xenbus_read_unsigned() in xen-netback
xen: make use of xenbus_read_unsigned() in xen-netfront
xen: make use of xenbus_read_unsigned() in xen-pcifront
xen: make use of xenbus_read_unsigned() in xen-scsifront
xen: make use of xenbus_read_unsigned() in xen-fbfront
xen: make use of xenbus_read_unsigned() in xen-pciback
xen: make use of xenbus_read_unsigned() in xenbus
drivers/block/xen-blkback/xenbus.c | 36 ++++++--------
drivers/block/xen-blkfront.c | 81 ++++++++++---------------------
drivers/char/tpm/xen-tpmfront.c | 8 +--
drivers/input/misc/xen-kbdfront.c | 13 ++---
drivers/net/xen-netback/xenbus.c | 50 ++++++-------------
drivers/net/xen-netfront.c | 67 +++++++------------------
drivers/pci/xen-pcifront.c | 6 +--
drivers/scsi/xen-scsifront.c | 6 +--
drivers/video/fbdev/xen-fbfront.c | 13 ++---
drivers/xen/xen-pciback/xenbus.c | 8 ++-
drivers/xen/xenbus/xenbus_probe_backend.c | 8 +--
drivers/xen/xenbus/xenbus_xs.c | 22 +++++++--
include/xen/xenbus.h | 4 ++
13 files changed, 112 insertions(+), 210 deletions(-)
Cc: konrad.wilk@oracle.com
Cc: roger.pau@citrix.com
Cc: peterhuewe@gmx.de
Cc: tpmdd@selhorst.net
Cc: jarkko.sakkinen@linux.intel.com
Cc: jgunthorpe@obsidianresearch.com
Cc: tpmdd-devel@lists.sourceforge.net
Cc: dmitry.torokhov@gmail.com
Cc: linux-input@vger.kernel.org
Cc: wei.liu2@citrix.com
Cc: paul.durrant@citrix.com
Cc: netdev@vger.kernel.org
Cc: bhelgaas@google.com
Cc: linux-pci@vger.kernel.org
Cc: tomi.valkeinen@ti.com
Cc: linux-fbdev@vger.kernel.org
--
2.6.6
Use xenbus_read_unsigned() instead of xenbus_scanf() when possible.
This requires to change the type of the reads from int to unsigned,
but these cases have been wrong before: negative values are not allowed
for the modified cases.
Cc: tomi.valkeinen@ti.com
Cc: linux-fbdev@vger.kernel.org
Signed-off-by: Juergen Gross <jgross@suse.com>
---
drivers/video/fbdev/xen-fbfront.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
There are multiple instances of code reading an optional unsigned
parameter from Xenstore via xenbus_scanf(). Instead of repeating the
same code over and over add a service function doing the job and
replace the call of xenbus_scanf() with the call of the new function
where appropriate.
As this seems to be a series that will go through some tree other
than mine, I assume the networking bits will be taken care of that
way.
There are multiple instances of code reading an optional unsigned
parameter from Xenstore via xenbus_scanf(). Instead of repeating the
same code over and over add a service function doing the job and
replace the call of xenbus_scanf() with the call of the new function
where appropriate.
As this seems to be a series that will go through some tree other
than mine, I assume the networking bits will be taken care of that
way.
If accepted I expect this series to go through the Xen tree.
Juergen
From: David Vrabel <hidden> Date: 2016-11-07 11:08:19
On 31/10/16 16:48, Juergen Gross wrote:
There are multiple instances of code reading an optional unsigned
parameter from Xenstore via xenbus_scanf(). Instead of repeating the
same code over and over add a service function doing the job and
replace the call of xenbus_scanf() with the call of the new function
where appropriate.
Acked-by: David Vrabel <redacted>
Please queue for the next release.
David
From: Jarkko Sakkinen <hidden> Date: 2016-11-07 16:20:58
On Mon, Nov 07, 2016 at 11:08:09AM +0000, David Vrabel wrote:
On 31/10/16 16:48, Juergen Gross wrote:
quoted
There are multiple instances of code reading an optional unsigned
parameter from Xenstore via xenbus_scanf(). Instead of repeating the
same code over and over add a service function doing the job and
replace the call of xenbus_scanf() with the call of the new function
where appropriate.
Acked-by: David Vrabel <redacted>
Please queue for the next release.
If you want this change to tpmdd, please resend it to tpmdd mailing
list and CC it to linux-security-module. Thanks.