Fix "CHECK: Alignment should match open parenthesis"
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The buffer_status field is interrupt updated. After every read request,
the buffer_status read field should be reset so that on the next loop
iteration we don't read a stale value and read data before the
device is ready.
Signed-off-by: Joshua Lang <[email protected]>
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Add an ACPI id to make goldfish audio to support ACPI enumeration.
Signed-off-by: Yu Ning <[email protected]>
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Functions are less error-prone and generate cleaner compilation.
Signed-off-by: Roman Kiryanov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The test selects between two identical values, so it doesn't look useful.
It turns out that the tested expression can only be true anyway, so drop
the test, the corresponding parameter, and the corresponding argument at
the only call site.
The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression e,e1;
@@
* e ? e1 : e1
// </smpl>
Signed-off-by: Julia Lawall <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The pointers vchiq_dbg_dir and vchiq_dbg_clients are local to the
source and do not need to be in global scope, so make them static.
Cleans up sparse warnings:
warning: symbol 'vchiq_dbg_dir' was not declared. Should it be static?
warning: symbol 'vchiq_dbg_clients' was not declared. Should it be static?
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The use of load and unload hooks is deprecated. DRM drivers should
use drm_dev_alloc|drm_dev_init and drm_dev_register for initialization
and publishing.
Signed-off-by: Fabio Rafael da Rosa <[email protected]>
Reviewed-by: Nicholas Mc Guire <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Cleanup patch to remove 'txq_spinlock_flags' element in 'wilc' and used
local variable 'flag' in wilc_wlan_txq_filter_dup_tcp_ack().
Signed-off-by: Ajay Singh <[email protected]>
Reviewed-by: Claudiu Beznea <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Removed unnecessary 'rxq_entries' element from 'wilc' struct, as its
value is not used.
Signed-off-by: Ajay Singh <[email protected]>
Reviewed-by: Claudiu Beznea <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Make use of 'list_head' data structure to maintain the rx buffer queue.
Modified wilc_wlan_rxq_add() to add the element at the tail by using
list_head API and wilc_wlan_rxq_remove() to remove the element from
head.
Signed-off-by: Ajay Singh <[email protected]>
Reviewed-by: Claudiu Beznea <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Use list_head data structure for the doubly linked list instead of own
implementation.
Only 'txq_head' is required, so removed the txq_tail pointer from
'wilc' structure.
Following functions are modified to provide data using list_head API's
wilc_wlan_txq_remove()
wilc_wlan_txq_remove_from_head()
wilc_wlan_txq_add_to_tail()
wilc_wlan_txq_add_to_head()
wilc_wlan_txq_get_first()
wilc_wlan_txq_get_next()
Signed-off-by: Ajay Singh <[email protected]>
Reviewed-by: Claudiu Beznea <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
If rtsx_probe() fails to allocate dev->chip, then release_everything()
will crash on uninitialized dev->cmnd_ready complete.
Patch adds error handling into rtsx_probe.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Anton Vasilyev <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Fixes the checkpatch warning:
WARNING: prefer 'help' over '---help---' for new help texts
+config COMMON_CLK_XLNX_CLKWZRD
Signed-off-by: Kyle Buzby <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Change comparison to NULL to better adhere to coding standard.
Signed-off-by: John Whitmore <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Declaration of function was spread over three lines.
Signed-off-by: John Whitmore <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Function HTIOTActIsDisableMCS14 contained spurious space at start of line.
Signed-off-by: John Whitmore <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Function HTIOTPeerDetermine used incorrect indentation in if statements.
Signed-off-by: John Whitmore <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Return statments from void functions are not required by the coding standard.
Signed-off-by: John Whitmore <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Added spaces around various operators, as preferred by coding style.
Signed-off-by: John Whitmore <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
In the PI433_IOC_WR_TX_CFG case in pi433_ioctl, instance->tx_cfg is
modified via
copy_from_user(&instance->tx_cfg, argp, sizeof(struct pi433_tx_cfg)))
without any kind of synchronization. In the case where two threads
would execute this same command concurrently the tx_cfg field might
enter in an inconsistent state.
Additionally: if ioctl(PI433_IOC_WR_TX_CFG) and write() execute
concurrently the tx config might be modified while it is being
copied to the fifo, resulting in potential data corruption.
Fix: Get instance->tx_cfg_lock before modifying tx config in the
PI433_IOC_WR_TX_CFG case in pi433_ioctl.
Also, do not copy data directly from user space to instance->tx_cfg.
Instead use a temporary buffer allowing future checks for correctness
of copied data and simpler code.
Signed-off-by: Hugo Lefeuvre <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch removes space after * to fix the following checkpatch error:
ERROR: "foo * bar" should be "foo *bar"
Signed-off-by: Abdun Nihaal <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The patch fixes following checkpatch.pl issue:
ERROR : space required before the open parenthesis
Signed-off-by: Sankalp Negi <[email protected]>
Reviewed-by: NeilBrown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The patch fixes following checkpatch.pl issue:
ERROR : code indent should use tabs where possible
Signed-off-by: Sankalp Negi <[email protected]>
Reviewed-by: NeilBrown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The patch fixes following checkpatch.pl issue:
ERROR : switch and case should be at the same indent
Signed-off-by: Sankalp Negi <[email protected]>
Reviewed-by: NeilBrown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Now that gpio-interrupts work correctly, we
can use gpio-keys instead of gpio-keys-polled
for the single push-button on the gbpc-1.
Signed-off-by: NeilBrown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The MT7621 documentation says that the sys clock - also known
as OCP clock for the Open Core Protocol - can be configured to
1/3 or 1/4 of the CPU clock.
Testing on my hardware, using the fact that the SPI clock is
based on the OCP clock and measuring transfer rates, shows
a clock of a little over 200MHz with a CPU clock of 900MHz.
So assume 1/4 is the default.
Also, the nor-flash in the gbpc1 is documented as accepting 50MHz
for request requests, and higher for other requests. So set
maximum to 50MHz.
Signed-off-by: NeilBrown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The mt7621 SPI engine has a 32 byte buffer and the driver
currently only allows 32-byte read requests and 36 bytes writes
(there is a 4byte op/addr buffer).
This is an unnecessary limitation. As the SPI clock is controlled
by the host it is quite acceptable to send a larger message in
multiple smaller transactions. As long as Chip Select is kept asserted
the whole time, the SPI engine can be run multiple times for
a single SPI message.
This patch factors out the transaction logic and calls for each
transfer in the message. A write transfer might leave bytes in the
buffer to be combined with a following read transfer, as this is
a common pattern.
With this in place, we can remove the current max_transfer_size limit.
In testing, this increases the read throughput for a NOR flash chip
from 1.4MB/s to 2.3MB/s, a 50% improvement.
Signed-off-by: NeilBrown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
All callers have a 'struct mt7621_spi' and that is all
mt7621_spi_wait_till_ready() needs. So just pass it
instead of the spi_device.
Signed-off-by: NeilBrown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This driver currently has internal knowledge ofthe address
of system-control registers and accesses them by dereferencing
a constant pointer.
It is cleaner to use rt_sysc_r32(), rt_sysc_w32(), rt_sysc_m32()
which is a more standard interface.
So change the defined names to offsets instead of pointers,
and use these functions.
Signed-off-by: NeilBrown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The synths[] array is a collection of synths acting like a list.
There is no need for synths to be an array, so refactor synths[] to use
standard kernel list_head API, instead, and modify the usages to suit.
As a side-effect, the maximum number of synths has also become redundant.
Signed-off-by: Justin Skists <[email protected]>
Reviewed-by: Samuel Thibault <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Improve readability of comedi_nsamples_left:
a) Reduce nesting by using more return statements.
b) Declare variables scans_left and samples_left at start of function.
c) Change type of scans_Left to unsigned long long to avoid cast.
Signed-off-by: Chris Opperman <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Checkpatch.pl complains about "quoted string split across lines" for
string in MODULE_DESCRIPTION().
Put string on only one line.
Signed-off-by: Giulio Benetti <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Checkpatch complains on bool bitfields to be an int or u8/u16/u32
bitfield.
Make bool bit-fields to be unsigned int bit-fields.
Signed-off-by: Giulio Benetti <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Checkpatch complains on bool bitfields to be an int or u8/u16/u32
bitfield.
Make bool bit-fields to be unsigned int bit-fields.
Signed-off-by: Giulio Benetti <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Checkpatch complains on bool bitfields to be an int or u8/u16/u32
bitfield.
Make bool bit-fields to be unsigned int bit-fields.
Signed-off-by: Giulio Benetti <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Checkpatch complains on bool bitfields to be an int or u8/u16/u32
bitfield.
Make bool bit-fields to be unsigned int bit-fields.
Signed-off-by: Giulio Benetti <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Checkpatch complains on bool bitfields to be an int or u8/u16/u32
bitfield.
Make bool bit-fields to be unsigned int bit-fields.
Signed-off-by: Giulio Benetti <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>