27 Feb, 2020
1 commit
-
The current codebase makes use of the zero-length array language
extension to the C90 standard, but the preferred mechanism to declare
variable-length types such as these ones is a flexible array member[1][2],
introduced in C99:struct foo {
int stuff;
struct boo array[];
};By making use of the mechanism above, we will get a compiler warning
in case the flexible array does not occur last in the structure, which
will help us prevent some kind of undefined behavior bugs from being
inadvertently introduced[3] to the codebase from now on.Also, notice that, dynamic memory allocations won't be affected by
this change:"Flexible array members have incomplete type, and so the sizeof operator
may not be applied. As a quirk of the original implementation of
zero-length arrays, sizeof evaluates to zero."[1]This issue was found with the help of Coccinelle.
[1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
[2] https://github.com/KSPP/linux/issues/21
[3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour")Link: https://lkml.kernel.org/r/20200221150612.GA9717@embeddedor
Signed-off-by: Gustavo A. R. Silva
Signed-off-by: Vasily Gorbik
02 Nov, 2017
1 commit
-
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.By default all files without license information are under the default
license of the kernel, which is GPL version 2.Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.How this work was done:
Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if
Reviewed-by: Philippe Ombredanne
Reviewed-by: Thomas Gleixner
Signed-off-by: Greg Kroah-Hartman
08 Jan, 2015
1 commit
-
Removes some functions that are not used anywhere:
idset_clear() idset_sch_get_first()This was partially found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
Signed-off-by: Heiko Carstens
Signed-off-by: Martin Schwidefsky
17 Apr, 2013
1 commit
-
Use BITS_TO_LONGS() instead of __BITOPS_WORDS() that is considered
to be private macro in asm/bitops.h for s390.Signed-off-by: Akinobu Mita
Signed-off-by: Heiko Carstens
Signed-off-by: Martin Schwidefsky
07 Nov, 2012
1 commit
-
bitmap_or uses the number of bits as its length parameter and
not the number of words necessary to store those bits.This fixes a regression introduced by:
aa92b33 s390/cio: use generic bitmap functionsReported-by: Christian Ehrhardt
Acked-by: Peter Oberparleiter
Signed-off-by: Sebastian Ott
Signed-off-by: Martin Schwidefsky
18 Oct, 2012
2 commits
-
Receiving cc=3 from store subchannel means 2 things:
* the subchannel is not provided
* there are no further subchannels in this subchannel setWith this patch we abort the store subchannel loop after cc=3 (or an
exception) and clear the subsequent bits in the subchannel id set.Reported-by: Cornelia Huck
Signed-off-by: Sebastian Ott
Acked-by: Peter Oberparleiter
Signed-off-by: Martin Schwidefsky -
Use generic bitmap functions in the subchannel id bitmap to
simplify and de-bloat the code.Signed-off-by: Sebastian Ott
Acked-by: Peter Oberparleiter
Signed-off-by: Martin Schwidefsky
20 Jul, 2012
1 commit
-
Remove the file name from the comment at top of many files. In most
cases the file name was wrong anyway, so it's rather pointless.Also unify the IBM copyright statement. We did have a lot of sightly
different statements and wanted to change them one after another
whenever a file gets touched. However that never happened. Instead
people start to take the old/"wrong" statements to use as a template
for new files.
So unify all of them in one go.Signed-off-by: Heiko Carstens
23 Sep, 2009
3 commits
-
Previously, there were multiple subchannel scanning mechanisms
which could potentially conflict with each other. Fix this problem
by moving blacklist and ccw driver triggered scanning to the
existing evaluation method.Signed-off-by: Sebastian Ott
Signed-off-by: Martin Schwidefsky -
The functions idset_sch_new and for_each_subchannel_staged
use different values for the number of subchannel sets. Make
it consistent by changing idset_sch_new to also use the actual
number of subchannel sets.Signed-off-by: Sebastian Ott
Signed-off-by: Martin Schwidefsky -
Use css_eval_scheduled to determine if all scheduled subchannel
evaluation is finished. Wait for this value to be 0 in the
channel subsystem init function.Signed-off-by: Sebastian Ott
Signed-off-by: Martin Schwidefsky