Age | Commit message (Collapse) | Author | Files | Lines |
|
This macro was only used in four places to declare two variables.
It saved one line of code, but in our opinion hurt readability.
So we removed the macro, substituting every occurrence with the
declaration of the two variables (like the preprocessor would have done).
Signed-off-by: Fabian Huegel <[email protected]>
Signed-off-by: Christoph Volkert <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Some complex multi-line macros were not enclosed by a do-while(0),
so we fixed that.
Signed-off-by: Fabian Huegel <[email protected]>
Signed-off-by: Christoph Volkert <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Correct minor checkpatch issues.
Signed-off-by: Kenny Ballou <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch removes enum typedef BUS_RELEASE_T and define
"enum bus_release" to use instead of typedef.
checkpatch.pl not to add new typedef warning is fixed with this patch.
Signed-off-by: Ajay Singh <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch removes enum typedef BUS_ACQUIRE_T and define
enum bus_acquire to use instead of typedef.
checkpatch.pl not to add new typedef warning is fixed with this patch.
Signed-off-by: Ajay Singh <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch removes enum typedef CHIP_PS_STATE_T and introduce
enum chip_ps_states to use instead of typedef.
checkpatch.pl not to add new typedef warning is fixed with this patch.
Signed-off-by: Ajay Singh <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch removed the unnecessary enum typedef for BEACON_IE &
TX_RATE_T
It fix "WARNING: do not add new typedefs" reported by checkpatch.pl
Signed-off-by: Ajay Singh <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch has removed G_OPERATING_MODE_T typedef enum.
Now, its used as anonymous-enums for constants.
checkpatch.pl warning to avoid new typedef is fixes with this patch.
Signed-off-by: Ajay Singh <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch removes typedef from enum BSSTYPE_T and
rename it to bss_types.
It fixes "WARNING: do not add new typdefs" warning
reported by checkpatch.pl.
Signed-off-by: Ajay Singh <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The current error exit path in function cc_ivgen_init via label
'out' free's resources from the drvdata->ivgen_handle context.
However, drvdata->ivgen_handle has not been assigned to the
context ivgen_ctx at this point, so the resources are not freed.
Fix this by setting drvdata->ivgen_handle to ivgen_ctx as early
as possible so that the clean up error exit return path can free
the resources.
Detected by CoveritScan, CID#1463795 ("Resource leak")
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.
Signed-off-by: Wei Yongjun <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
These lines are less than 80 characters so we don't need to break them
up into chunks.
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
There are now no users. workqueues are doing the job
that this used to do.
Signed-off-by: NeilBrown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Instead of the cfs workitem library, use workqueues.
As lnet wants to provide a cpu mask of allowed cpus, it
needs to be a WQ_UNBOUND work queue so that tasks can
run on cpus other than where they were submitted.
This patch also exported apply_workqueue_attrs() which is
a documented part of the workqueue API, that isn't currently
exported. lustre needs it to allow workqueue thread to be limited
to a subset of CPUs.
Acked-by: Tejun Heo <[email protected]> (for export of apply_workqueue_attrs)
Signed-off-by: NeilBrown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch changes the indentation of the statements after case labels.
The linux coding guidelines do not explicitly mentiond this but pretty
much all existing code doesn't put any statements into the same line of
their belonging case labels. Therefore this adapts to the more usual style.
Please note that there is still a lot of > 80 character lines which will
cause checkpatch warnings. This patch does not intent to fix this
already existing issue.
Signed-off-by: Michael Panzlaff <[email protected]>
Signed-off-by: Tillmann Zipperer <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The trailing semicolon is an empty statement that does nothing.
Removing it since it has no purpose.
Signed-off-by: Luis de Bethencourt <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The trailing semicolon is an empty statement that does no operation.
Removing it since it doesn't do anything.
Signed-off-by: Luis de Bethencourt <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This fixes the checkpatch message:
CHECK: Alignment should match open parenthesis
#1380: FILE: drivers/staging/fbtft/fbtft-core.c:1380:
+ dev_warn(dev,
+ "no default functions for regwidth=%d and buswidth=%d\n",
Signed-off-by: Luis Gerhorst <[email protected]>
Signed-off-by: Jonny Schaefer <[email protected]>
Acked-by: Alexander Wuerstlein <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Fixes the misspelled constant to 'SWITCH_NO_ERR'.
Issue reported by checkpatch.pl
Signed-off-by: Sumit Pundir <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Several staging directories have TODO files that indicate a
subsystem will be removed in the future.
Using a status entry of "S: Obsolete" helps indicate the
subsystem files should not be modified unnecessarily.
checkpatch also tests this setting and emits a warning that
the matching subsystem files should not be modified.
This might help avoid receiving patches that will be dropped.
Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The trailing semicolon is an empty statement that does no operation.
Removing it since it doesn't do anything.
Signed-off-by: Luis de Bethencourt <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Casting a value returned by memory an allocation function is
not required and can be removed. Also add in a newline after before
the first statement. Code clean up as suggested by coccinelle.
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Fixes checkpatch warnings:
CHECK: Alignment should match open parenthesis
Signed-off-by: Valentin Vidic <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The dma mask var was defined as dma_addr_t but should be
u64. This showed as a sparse warning when building for 32 bit.
Fix it by changing type to u64 and drop the cast.
Signed-off-by: Gilad Ben-Yossef <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The debugfs interface defines stub function if debugfs is not
enabled, which were missing the 'static inline' qualifiers causing
sparse warnings.
Signed-off-by: Gilad Ben-Yossef <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Add the missing include of include file with function declarations.
Signed-off-by: Gilad Ben-Yossef <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Remove include files not needed for compilation.
Signed-off-by: Gilad Ben-Yossef <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The ccree driver source files were using an inconsistent
naming convention stemming from what the company was called
when they were added.
Move to a single consistent naming convention for better
code readability.
Signed-off-by: Gilad Ben-Yossef <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
LIBCFS_ALLOC
LIBCFS_ALLOC_ATOMIC
LIBCFS_ALLOC_POST
LIBCFS_CPT_ALLOC
LIBCFS_FREE
are no longer used, and so are removed.
Signed-off-by: NeilBrown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
LIBCFS_APT_ALLOC() calls kvmalloc_node() with GFP_NOFS
which is not permitted.
Mostly, a kmalloc_node(GFP_NOFS) is appropriate, though occasionally
the allocation is large and GFP_KERNEL is acceptable, so
kvmalloc_node() can be used.
This patch introduces 4 alternatives to LIBCFS_CPT_ALLOC():
kmalloc_cpt()
kzalloc_cpt()
kvmalloc_cpt()
kvzalloc_cpt().
Each takes a size, gfp flags, and cpt number.
Almost every call to LIBCFS_CPT_ALLOC() passes lnet_cpt_table()
as the table. This patch embeds that choice in the k*alloc_cpt()
macros, and opencode kzalloc_node(..., cfs_cpt_spread_node(..))
in the one case that lnet_cpt_table() isn't used.
When LIBCFS_CPT_ALLOC() is replaced, the matching LIBCFS_FREE()
is also replaced, with with kfree() or kvfree() as appropriate.
Signed-off-by: NeilBrown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Just call kzalloc(GFP_ATOMIC) directly.
We don't need the warning on failure.
Signed-off-by: NeilBrown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
this allocation is called from several places, but all are
during initialization, so GFP_NOFS is not needed.
So use kvmalloc and GFP_KERNEL.
Signed-off-by: NeilBrown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The size of the data structure is primarily controlled
by the iovec size, which is limited to 256.
Entries in this vector are 12 bytes, so the whole
will always fit in a page.
So it is safe to use kmalloc (kvmalloc not needed).
So replace LIBCFS_ALLOC with kmalloc.
Signed-off-by: NeilBrown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This allocation is reasonably small.
As the function is called "*_locked", it might not be safe
to perform a GFP_KERNEL allocation, so be safe and
use GFP_NOFS.
Signed-off-by: NeilBrown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
These are not called from filesystem context, so use
GFP_KERNEL, not LIBCFS_ALLOC().
Signed-off-by: NeilBrown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
None of these need GFP_NOFS so allocate directly.
Change matching LIBCFS_FREE() to kfree() or kvfree().
Signed-off-by: NeilBrown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
None of these need to be GFP_NOFS, so use GFP_KERNEL explicitly
with kmalloc(), kvmalloc(), or kvmalloc_array().
Change matching LIBCFS_FREE() to kfree() or kvfree()
Signed-off-by: NeilBrown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
When an allocation happens from process context rather than
filesystem context, it is best to use GFP_KERNEL rather than
LIBCFS_ALLOC() which always uses GFP_NOFS.
This include initialization during, or prior to, mount,
and code run from separate worker threads.
So for some of these cases, switch to kmalloc, kvmalloc, or
kvmalloc_array() as appropriate.
In some cases we preserve __GFP_ZERO (via kzalloc/kvzalloc), but in
others it is clear that allocated memory is immediately initialized.
In each case, the matching LIBCFS_FREE() is converted to
kfree() or kvfree()
This is just a subset of locations that need changing.
As there are quite a lot, I've broken them up into several
ad-hoc sets to avoid review-fatigue.
Signed-off-by: NeilBrown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The buffers allocated in router_proc are to temporarily
hold strings created for procfs files.
So they do not need to be zeroed and are safe to use
GFP_KERNEL.
So use kmalloc() directly except in two cases where it
isn't trivial to confirm that the size is always small.
In those cases, use kvmalloc().
Signed-off-by: NeilBrown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
All of the "name" buffers here are at most LST_NAME_SIZE+1
bytes, so 33 bytes at most.
They are only used temporarily during the life of the function
that allocates them.
So it is much simpler to just allocate on the stack.
Worst case is lst_tet_add_ioct(), which allocates
3 for these which 99 bytes on the stack, instead of the 24 that would
have been allocated for 64-bit pointers.
Signed-off-by: NeilBrown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
So that we can use the common cpumask allocation functions,
switch to cpumask_var_t.
We need to be careful not to free a cpumask_var_t until the
variable has been initialized, and it cannot be initialized
directly.
So we must be sure either that it is filled with zeros, or
that zalloc_cpumask_var() has been called on it.
Signed-off-by: NeilBrown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
All usages of the form
LIBCFS_ALLOC(variable, sizeof(variable))
or
LIBCFS_ALLOC(variable, sizeof(variable's-type))
are changed to
variable = kzalloc(sizeof(...), GFP_NOFS);
Similarly, all
LIBCFS_FREE(variable, sizeof(variable))
become
kfree(variable);
None of these need the vmalloc option, or any of the other minor
benefits of LIBCFS_ALLOC().
Signed-off-by: NeilBrown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Fixes checkpatch warnings:
CHECK: Prefer using the BIT macro
Signed-off-by: Valentin Vidic <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Fixed coding style issue regarding null comparison at multiple lines.
Issue reported by checkpatch.pl
Signed-off-by: Sumit Pundir <[email protected]>
Acked-by: Johan Hovold <[email protected]>
Reviewed-by: Alex Elder <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Syzbot reported a warning with Ion:
WARNING: CPU: 0 PID: 3502 at drivers/staging/android/ion/ion-ioctl.c:73 ion_ioctl+0x2db/0x380 drivers/staging/android/ion/ion-ioctl.c:73
Kernel panic - not syncing: panic_on_warn set ...
This is a warning that validation of the ioctl fields failed. This was
deliberately added as a warning to make it very obvious to developers that
something needed to be fixed. In reality, this is overkill and disturbs
fuzzing. Switch to pr_warn for a message instead.
Reported-by: [email protected]
Reported-by: syzbot <[email protected]>
Signed-off-by: Laura Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
syzbot reported a warning from Ion:
WARNING: CPU: 1 PID: 3485 at mm/page_alloc.c:3926
...
__alloc_pages_nodemask+0x9fb/0xd80 mm/page_alloc.c:4252
alloc_pages_current+0xb6/0x1e0 mm/mempolicy.c:2036
alloc_pages include/linux/gfp.h:492 [inline]
ion_system_contig_heap_allocate+0x40/0x2c0
drivers/staging/android/ion/ion_system_heap.c:374
ion_buffer_create drivers/staging/android/ion/ion.c:93 [inline]
ion_alloc+0x2c1/0x9e0 drivers/staging/android/ion/ion.c:420
ion_ioctl+0x26d/0x380 drivers/staging/android/ion/ion-ioctl.c:84
vfs_ioctl fs/ioctl.c:46 [inline]
do_vfs_ioctl+0x1b1/0x1520 fs/ioctl.c:686
SYSC_ioctl fs/ioctl.c:701 [inline]
SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692
This is a warning about attempting to allocate order > MAX_ORDER. This
is coming from a userspace Ion allocation request. Since userspace is
free to request however much memory it wants (and the kernel is free to
deny its allocation), silence the allocation attempt with __GFP_NOWARN
in case it fails.
Reported-by: [email protected]
Reported-by: syzbot <[email protected]>
Signed-off-by: Laura Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch removes FSF's mailing address issue from io.h found by
checkpatch.pl tool.
Signed-off-by: Shubham Kumaram <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Remove multiple blank lines. Issue found by checkpatch.
Signed-off-by: Marcelo Guzmán Lamperti <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Use the newly added DPIO service API to map cpu-affine DPIO services
to channels.
The DPAA2 Ethernet driver already had mappings of frame queues and
channels to cpus, but had no control over the DPIOs used. We can
now ensure full affinity of hotpath hardware resources to cores,
which improves performance and almost eliminates some resource
contentions (e.g. enqueue/dequeue busy counters should be close to
zero from now on).
Making the pull channel operation core affine brings the most
significant benefits. This ensures the same DPIO service will be
used for all dequeue commands issued for a certain frame queue,
which is in line with the way hardware is optimized.
Additionally, we also use affine DPIOs for the frame enqueue and
buffer release operations in order to avoid resource contention.
dpaa2_io_service_register() and dpaa2_io_service_rearm()
functions receive an affine DPIO as argument mostly for uniformity,
but this doesn't change the previous functionality.
Signed-off-by: Ioana Radulescu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
All DPIO service API functions receive a dpaa2_io service pointer
as parameter (NULL meaning any service will do) which indicates
the hardware resource to be used to execute the specified command.
There isn't however any available API for obtaining such a service
reference that could be used further, effectively forcing the users
to always request a random service for DPIO operations.
(The DPIO driver holds internally an array mapping services to cpus,
and affine services can be indirectly requested by a couple of API
functions: dpaa2_io_service_register and dpaa2_io_service_rearm
use the cpu id provided by the user to select the corresponding
service)
This patch adds a function for selecting a DPIO service based on
the specified cpu id. If the user provides a "don't care" value
for the cpu, we revert to the default behavior and return the next
DPIO, taken in a round-robin fashion from a list of available
services.
Signed-off-by: Ioana Radulescu <[email protected]>
Acked-by: Roy Pledge <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|