Commit Graph

11 Commits

Author SHA1 Message Date
Andy Shevchenko
e5e325722f platform/x86: dell_rbu: Unify format of the printed messages
Here we do:
- unify all message to have module name prefix via pr_fmt()
- replace printk(LEVEL ... ) with pr_level(...)
- drop __func__ from messages
- join string literals to be on one line
- drop trailing periods and spaces

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2020-02-10 17:47:38 +02:00
Andy Shevchenko
682baa24e2 platform/x86: dell_rbu: Use max_t() to get rid of casting
There is no need to cast both values in max_t() macro, so, use it.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2020-02-10 17:47:38 +02:00
Andy Shevchenko
45e21277f9 platform/x86: dell_rbu: Simplify cleanup code in create_packet()
The code looks more nicer if we use:
	while (idx--)
instead:
	for (;idx>0;idx--)

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2020-02-10 17:47:38 +02:00
Andy Shevchenko
d19f359fbd platform/x86: dell_rbu: don't open code list_for_each_entry*()
The loop declaration in packet_read_list() and packet_empty_list()
can be simplified by reusing the common list_for_each_entry*()
helper macros.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2020-02-10 17:47:38 +02:00
Andy Shevchenko
94ed313404 platform/x86: dell_rbu: Use sysfs_create_group() API
Use sysfs_create_group() API instead of open coded variant.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2020-02-10 17:47:38 +02:00
Jonathan Neuschäfer
d4300c4e4f docs: admin-guide: Move Dell RBU document from driver-api
This document describes how an admin can use the dell_rbu driver, rather
than any in-kernel API details.

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2019-10-15 12:35:39 -06:00
Mauro Carvalho Chehab
baa293e954 docs: driver-api: add a series of orphaned documents
There are lots of documents under Documentation/*.txt and a few other
orphan documents elsehwere that belong to the driver-API book.

Move them to their right place.

Reviewed-by: Cornelia Huck <cohuck@redhat.com> # vfio-related parts
Acked-by: Logan Gunthorpe <logang@deltatee.com> # switchtec
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-15 11:03:02 -03:00
Thomas Gleixner
d95236782b treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 287
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license v2 0 as
  published by the free software foundation this program is
  distributed in the hope that it will be useful but without any
  warranty without even the implied warranty of merchantability or
  fitness for a particular purpose see the gnu general public license
  for more details

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 23 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Alexios Zavras <alexios.zavras@intel.com>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190529141901.115786599@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-05 17:36:37 +02:00
Christoph Hellwig
f27e1d1826 platform/x86: dell_rbu: fix lock imbalance in img_update_realloc
We need to ensure rbu_data.lock is always held on return.

Fixes: 289790a3ea94 ("platform/x86: dell_rbu: stop abusing the DMA API")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Stuart Hayes <stuart.w.hayes@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2019-02-23 09:20:56 -08:00
Christoph Hellwig
fd47a36fba platform/x86: dell_rbu: stop abusing the DMA API
For some odd reason dell_rbu actually seems to want the physical and
not a bus address for the allocated buffer.  Lets assume that actually
is correct given that it is BIOS-related and that is a good source
of insanity.  In that case we should not use dma_alloc_coherent with
a NULL device to allocate memory, but use GFP_DMA32 to stay under
the 32-bit BIOS limit.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Stuart Hayes <stuart.w.hayes@gmail.com>
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2019-02-23 09:20:25 -08:00
Stuart Hayes
c48e2ffd71 firmware: dell_rbu: Move dell_rbu to drivers/platform/x86
Move dell_rbu to the more appropriate directory drivers/platform/x86.

Signed-off-by: Stuart Hayes <stuart.w.hayes@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-09-27 12:18:15 +03:00