Skip to contentSkip to conversation

drivers: ddcci: upstream DDCCI driver

PATCH Superseded Yusuf Khan 3 participants 6 messages Feb 26, 2022

v2 of 9 Superseded Latest is v9 →

lore
Share & tools
lore

Yusuf Khan

author
#0 lore raw

PATCH v2 1/1 drivers: ddcci: upstream DDCCI driver

This patch upstreams the DDCCI driver by Christoph Grenz into the kernel. The original gitlab page is loacted at https://gitlab
.com/ddcci-driver-linux/ddcci-driver-linux/-/tree/master.

---
 drivers/Kconfig                 |    2 +
 drivers/Makefile                |    1 +
 drivers/ddcci/Kconfig           |    5 +
 drivers/ddcci/Makefile          |    3 +
 drivers/ddcci/ddcci-backlight.c |  411 +++++++
 drivers/ddcci/ddcci.c           | 1887 +++++++++++++++++++++++++++++++
 include/linux/ddcci.h           |  164 +++
 7 files changed, 2473 insertions(+)
 create mode 100644 drivers/ddcci/Kconfig
 create mode 100644 drivers/ddcci/Makefile
 create mode 100644 drivers/ddcci/ddcci-backlight.c
 create mode 100644 drivers/ddcci/ddcci.c
 create mode 100644 include/linux/ddcci.h
drivers/Kconfig +2 -0
index 0d399ddaa185..3a58a29113f9 100644
@@ -236,4 +236,6 @@ source "drivers/interconnect/Kconfig"
 source "drivers/counter/Kconfig"
 
 source "drivers/most/Kconfig"
+
+source "drivers/ddcci/Kconfig"
 endmenu
drivers/Makefile +1 -0
index a110338c860c..c9181f1dc5aa 100644
@@ -21,6 +21,7 @@ obj-y				+= pci/
 obj-$(CONFIG_PARISC)		+= parisc/
 obj-$(CONFIG_RAPIDIO)		+= rapidio/
 obj-y				+= video/
+obj-$(CONFIG_DDCCI)				+= ddcci/
 obj-y				+= idle/
 
 # IPMI must come before ACPI in order to provide IPMI opregion support
drivers/ddcci/Kconfig new file +5 -0
new file mode 100644
index 000000000000..93ceebb3a379
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0-only
+menuconfig DDCCI
+	tristate "DDCCI display protocol support"
+	help
+	  Say Y here if you want to have DDCCI
drivers/ddcci/Makefile new file +3 -0
new file mode 100644
index 000000000000..cce606be8038
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0
+obj-$(CONFIG_DDCCI) += ddcci.o
+obj-$(CONFIG_DDCCI) += ddcci-backlight.o
drivers/ddcci/ddcci-backlight.c new file +411 -0

411 lines not on this page · raw message

drivers/ddcci/ddcci.c new file +1887 -0

1,887 lines not on this page · raw message

include/linux/ddcci.h new file +164 -0

164 lines not on this page · raw message

Signature · 1 line
2.25.1
#1 lore raw
Quoted 5 lines · Yusuf Khan

This patch upstreams the DDCCI driver by Christoph Grenz into the kernel. The original gitlab page is loacted at https://gitlab
.com/ddcci-driver-linux/ddcci-driver-linux/-/tree/master.

Quoted 15 lines
---
 drivers/Kconfig                 |    2 +
 drivers/Makefile                |    1 +
 drivers/ddcci/Kconfig           |    5 +
 drivers/ddcci/Makefile          |    3 +
 drivers/ddcci/ddcci-backlight.c |  411 +++++++
 drivers/ddcci/ddcci.c           | 1887 +++++++++++++++++++++++++++++++
 include/linux/ddcci.h           |  164 +++
 7 files changed, 2473 insertions(+)
 create mode 100644 drivers/ddcci/Kconfig
 create mode 100644 drivers/ddcci/Makefile
 create mode 100644 drivers/ddcci/ddcci-backlight.c
 create mode 100644 drivers/ddcci/ddcci.c
 create mode 100644 include/linux/ddcci.h

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree.

You are receiving this message because of the following common error(s) as indicated below:

- This looks like a new version of a previously submitted patch, but you did not list below the --- line any changes from the previous version. Please read the section entitled "The canonical patch format" in the kernel file, Documentation/SubmittingPatches for what needs to be done here to properly describe this.

If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers.

thanks,

greg k-h's patch email bot

#2 lore raw
In reply to Yusuf Khan

drivers/ddcci/Kconfig line 5

Quoted 8 lines · Yusuf Khan
drivers/ddcci/Kconfig new file +5 -0
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0-only
+menuconfig DDCCI
+	tristate "DDCCI display protocol support"
+	help
+	  Say Y here if you want to have DDCCI

You need to explain what this is, what uses it, and why anyone would want to enable it. We have no idea what this driver is supposed to do :(

#3 lore raw
In reply to Yusuf Khan
Quoted 5 lines · Yusuf Khan

This patch upstreams the DDCCI driver by Christoph Grenz into the kernel. The original gitlab page is loacted at https://gitlab
.com/ddcci-driver-linux/ddcci-driver-linux/-/tree/master.

Quoted 8 lines
---
 drivers/Kconfig                 |    2 +
 drivers/Makefile                |    1 +
 drivers/ddcci/Kconfig           |    5 +
 drivers/ddcci/Makefile          |    3 +
 drivers/ddcci/ddcci-backlight.c |  411 +++++++
 drivers/ddcci/ddcci.c           | 1887 +++++++++++++++++++++++++++++++
 include/linux/ddcci.h           |  164 +++

Also, you create a lot of sysfs files here, yet document none of them in Documentation/ABI/ which will make tools like scripts/get_abi.pl unhappy. Please fix that in your next submission.

thanks,

greg k-h

#4 lore raw
In reply to Yusuf Khan
Thank you for the patch! Perhaps something to improve:

Hi Yusuf,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linux/master]
[also build test WARNING on staging/staging-testing linus/master v5.17-rc5] [cannot apply to next-20220225]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Yusuf-Khan/drivers-ddcci-upstream-DDCCI-driver/20220226-120531
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 2c271fe77d52a0555161926c232cd5bc07178b39
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20220226/[email protected]/config)
compiler: alpha-linux-gcc (GCC) 11.2.0

reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/7eb8029b70584acc0e9ce82dfdcff13c5496f544
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Yusuf-Khan/drivers-ddcci-upstream-DDCCI-driver/20220226-120531 git checkout 7eb8029b70584acc0e9ce82dfdcff13c5496f544
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=alpha SHELL=/bin/bash drivers/ddcci/

If you fix the issue, kindly add following tag as appropriate

All warnings (new ones prefixed by >>):

In file included from include/uapi/linux/fcntl.h:5,

                    from include/linux/fcntl.h:6,
                    from include/linux/fs.h:26,
                    from drivers/ddcci/ddcci.c:20:
>> arch/alpha/include/uapi/asm/fcntl.h:5: warning: "O_CREAT" redefined
       5 | #define O_CREAT          01000  /* not fcntl */
         | 
   In file included from drivers/ddcci/ddcci.c:16:
   include/uapi/asm-generic/fcntl.h:24: note: this is the location of the previous definition
      24 | #define O_CREAT         00000100        /* not fcntl */
         | 
   In file included from include/uapi/linux/fcntl.h:5,
                    from include/linux/fcntl.h:6,
                    from include/linux/fs.h:26,
                    from drivers/ddcci/ddcci.c:20:
>> arch/alpha/include/uapi/asm/fcntl.h:6: warning: "O_TRUNC" redefined
       6 | #define O_TRUNC          02000  /* not fcntl */
         | 
   In file included from drivers/ddcci/ddcci.c:16:
   include/uapi/asm-generic/fcntl.h:33: note: this is the location of the previous definition
      33 | #define O_TRUNC         00001000        /* not fcntl */
         | 
   In file included from include/uapi/linux/fcntl.h:5,
                    from include/linux/fcntl.h:6,
                    from include/linux/fs.h:26,
                    from drivers/ddcci/ddcci.c:20:
>> arch/alpha/include/uapi/asm/fcntl.h:7: warning: "O_EXCL" redefined
       7 | #define O_EXCL           04000  /* not fcntl */
         | 
   In file included from drivers/ddcci/ddcci.c:16:
   include/uapi/asm-generic/fcntl.h:27: note: this is the location of the previous definition
      27 | #define O_EXCL          00000200        /* not fcntl */
         | 
   In file included from include/uapi/linux/fcntl.h:5,
                    from include/linux/fcntl.h:6,
                    from include/linux/fs.h:26,
                    from drivers/ddcci/ddcci.c:20:
>> arch/alpha/include/uapi/asm/fcntl.h:8: warning: "O_NOCTTY" redefined
       8 | #define O_NOCTTY        010000  /* not fcntl */
         | 
   In file included from drivers/ddcci/ddcci.c:16:
   include/uapi/asm-generic/fcntl.h:30: note: this is the location of the previous definition
      30 | #define O_NOCTTY        00000400        /* not fcntl */
         | 
   In file included from include/uapi/linux/fcntl.h:5,
                    from include/linux/fcntl.h:6,
                    from include/linux/fs.h:26,
                    from drivers/ddcci/ddcci.c:20:
>> arch/alpha/include/uapi/asm/fcntl.h:10: warning: "O_NONBLOCK" redefined
      10 | #define O_NONBLOCK       00004
         | 
   In file included from drivers/ddcci/ddcci.c:16:
   include/uapi/asm-generic/fcntl.h:39: note: this is the location of the previous definition
      39 | #define O_NONBLOCK      00004000
         | 
   In file included from include/uapi/linux/fcntl.h:5,
                    from include/linux/fcntl.h:6,
                    from include/linux/fs.h:26,
                    from drivers/ddcci/ddcci.c:20:
>> arch/alpha/include/uapi/asm/fcntl.h:11: warning: "O_APPEND" redefined
      11 | #define O_APPEND         00010
         | 
   In file included from drivers/ddcci/ddcci.c:16:
   include/uapi/asm-generic/fcntl.h:36: note: this is the location of the previous definition
      36 | #define O_APPEND        00002000
         | 
   In file included from include/uapi/linux/fcntl.h:5,
                    from include/linux/fcntl.h:6,
                    from include/linux/fs.h:26,
                    from drivers/ddcci/ddcci.c:20:
>> arch/alpha/include/uapi/asm/fcntl.h:12: warning: "O_DSYNC" redefined
      12 | #define O_DSYNC         040000  /* used to be O_SYNC, see below */
         | 
   In file included from drivers/ddcci/ddcci.c:16:
   include/uapi/asm-generic/fcntl.h:42: note: this is the location of the previous definition
      42 | #define O_DSYNC         00010000        /* used to be O_SYNC, see below */
         | 
   In file included from include/uapi/linux/fcntl.h:5,
                    from include/linux/fcntl.h:6,
                    from include/linux/fs.h:26,
                    from drivers/ddcci/ddcci.c:20:
>> arch/alpha/include/uapi/asm/fcntl.h:13: warning: "O_DIRECTORY" redefined
      13 | #define O_DIRECTORY     0100000 /* must be a directory */
         | 
   In file included from drivers/ddcci/ddcci.c:16:
   include/uapi/asm-generic/fcntl.h:54: note: this is the location of the previous definition
      54 | #define O_DIRECTORY     00200000        /* must be a directory */
         | 
   In file included from include/uapi/linux/fcntl.h:5,
                    from include/linux/fcntl.h:6,
                    from include/linux/fs.h:26,
                    from drivers/ddcci/ddcci.c:20:
>> arch/alpha/include/uapi/asm/fcntl.h:14: warning: "O_NOFOLLOW" redefined
      14 | #define O_NOFOLLOW      0200000 /* don't follow links */
         | 
   In file included from drivers/ddcci/ddcci.c:16:
   include/uapi/asm-generic/fcntl.h:57: note: this is the location of the previous definition
      57 | #define O_NOFOLLOW      00400000        /* don't follow links */
         | 
   In file included from include/uapi/linux/fcntl.h:5,
                    from include/linux/fcntl.h:6,
                    from include/linux/fs.h:26,
                    from drivers/ddcci/ddcci.c:20:
>> arch/alpha/include/uapi/asm/fcntl.h:15: warning: "O_LARGEFILE" redefined
      15 | #define O_LARGEFILE     0400000 /* will be set by the kernel on every open */
         | 
   In file included from drivers/ddcci/ddcci.c:16:
   include/uapi/asm-generic/fcntl.h:51: note: this is the location of the previous definition
      51 | #define O_LARGEFILE     00100000
         | 
   In file included from include/uapi/linux/fcntl.h:5,
                    from include/linux/fcntl.h:6,
                    from include/linux/fs.h:26,
                    from drivers/ddcci/ddcci.c:20:
>> arch/alpha/include/uapi/asm/fcntl.h:16: warning: "O_DIRECT" redefined
      16 | #define O_DIRECT        02000000 /* direct disk access - should check with OSF/1 */
         | 
   In file included from drivers/ddcci/ddcci.c:16:
   include/uapi/asm-generic/fcntl.h:48: note: this is the location of the previous definition
      48 | #define O_DIRECT        00040000        /* direct disk access hint */
         | 
   In file included from include/uapi/linux/fcntl.h:5,
                    from include/linux/fcntl.h:6,
                    from include/linux/fs.h:26,
                    from drivers/ddcci/ddcci.c:20:
>> arch/alpha/include/uapi/asm/fcntl.h:17: warning: "O_NOATIME" redefined
      17 | #define O_NOATIME       04000000
         | 
   In file included from drivers/ddcci/ddcci.c:16:
   include/uapi/asm-generic/fcntl.h:60: note: this is the location of the previous definition
      60 | #define O_NOATIME       01000000
         | 
   In file included from include/uapi/linux/fcntl.h:5,
                    from include/linux/fcntl.h:6,
                    from include/linux/fs.h:26,
                    from drivers/ddcci/ddcci.c:20:
>> arch/alpha/include/uapi/asm/fcntl.h:18: warning: "O_CLOEXEC" redefined
      18 | #define O_CLOEXEC       010000000 /* set close_on_exec */
         | 
   In file included from drivers/ddcci/ddcci.c:16:
   include/uapi/asm-generic/fcntl.h:63: note: this is the location of the previous definition
      63 | #define O_CLOEXEC       02000000        /* set close_on_exec */
         | 
   In file included from include/uapi/linux/fcntl.h:5,
                    from include/linux/fcntl.h:6,
                    from include/linux/fs.h:26,
                    from drivers/ddcci/ddcci.c:20:
>> arch/alpha/include/uapi/asm/fcntl.h:32: warning: "__O_SYNC" redefined
      32 | #define __O_SYNC        020000000
         | 
   In file included from drivers/ddcci/ddcci.c:16:
   include/uapi/asm-generic/fcntl.h:80: note: this is the location of the previous definition
      80 | #define __O_SYNC        04000000
         | 
   In file included from include/uapi/linux/fcntl.h:5,
                    from include/linux/fcntl.h:6,
                    from include/linux/fs.h:26,
                    from drivers/ddcci/ddcci.c:20:
>> arch/alpha/include/uapi/asm/fcntl.h:35: warning: "O_PATH" redefined
      35 | #define O_PATH          040000000
         | 
   In file included from drivers/ddcci/ddcci.c:16:
   include/uapi/asm-generic/fcntl.h:85: note: this is the location of the previous definition
      85 | #define O_PATH          010000000
         | 
   In file included from include/uapi/linux/fcntl.h:5,
                    from include/linux/fcntl.h:6,
                    from include/linux/fs.h:26,
                    from drivers/ddcci/ddcci.c:20:
>> arch/alpha/include/uapi/asm/fcntl.h:36: warning: "__O_TMPFILE" redefined
      36 | #define __O_TMPFILE     0100000000
         | 
   In file included from drivers/ddcci/ddcci.c:16:
   include/uapi/asm-generic/fcntl.h:89: note: this is the location of the previous definition
      89 | #define __O_TMPFILE     020000000
         | 
   In file included from include/uapi/linux/fcntl.h:5,
                    from include/linux/fcntl.h:6,
                    from include/linux/fs.h:26,
                    from drivers/ddcci/ddcci.c:20:
>> arch/alpha/include/uapi/asm/fcntl.h:38: warning: "F_GETLK" redefined
      38 | #define F_GETLK         7
         | 
   In file included from drivers/ddcci/ddcci.c:16:
   include/uapi/asm-generic/fcntl.h:106: note: this is the location of the previous definition
     106 | #define F_GETLK         5
         | 
   In file included from include/uapi/linux/fcntl.h:5,
                    from include/linux/fcntl.h:6,
                    from include/linux/fs.h:26,
                    from drivers/ddcci/ddcci.c:20:
>> arch/alpha/include/uapi/asm/fcntl.h:39: warning: "F_SETLK" redefined
      39 | #define F_SETLK         8
         | 
   In file included from drivers/ddcci/ddcci.c:16:
   include/uapi/asm-generic/fcntl.h:107: note: this is the location of the previous definition
     107 | #define F_SETLK         6
         | 
   In file included from include/uapi/linux/fcntl.h:5,
                    from include/linux/fcntl.h:6,
                    from include/linux/fs.h:26,
                    from drivers/ddcci/ddcci.c:20:
>> arch/alpha/include/uapi/asm/fcntl.h:40: warning: "F_SETLKW" redefined
      40 | #define F_SETLKW        9
         | 
   In file included from drivers/ddcci/ddcci.c:16:
   include/uapi/asm-generic/fcntl.h:108: note: this is the location of the previous definition
     108 | #define F_SETLKW        7
         | 
   In file included from include/uapi/linux/fcntl.h:5,
                    from include/linux/fcntl.h:6,
                    from include/linux/fs.h:26,
                    from drivers/ddcci/ddcci.c:20:
>> arch/alpha/include/uapi/asm/fcntl.h:42: warning: "F_SETOWN" redefined
      42 | #define F_SETOWN        5       /*  for sockets. */
         | 
   In file included from drivers/ddcci/ddcci.c:16:
   include/uapi/asm-generic/fcntl.h:111: note: this is the location of the previous definition
     111 | #define F_SETOWN        8       /* for sockets. */
         | 
   In file included from include/uapi/linux/fcntl.h:5,
                    from include/linux/fcntl.h:6,
                    from include/linux/fs.h:26,
                    from drivers/ddcci/ddcci.c:20:
   arch/alpha/include/uapi/asm/fcntl.h:43: warning: "F_GETOWN" redefined
      43 | #define F_GETOWN        6       /*  for sockets. */
         | 
   In file included from drivers/ddcci/ddcci.c:16:
   include/uapi/asm-generic/fcntl.h:112: note: this is the location of the previous definition
     112 | #define F_GETOWN        9       /* for sockets. */
         | 
   In file included from include/uapi/linux/fcntl.h:5,
                    from include/linux/fcntl.h:6,
                    from include/linux/fs.h:26,
                    from drivers/ddcci/ddcci.c:20:
   arch/alpha/include/uapi/asm/fcntl.h:48: warning: "F_RDLCK" redefined
      48 | #define F_RDLCK         1
         | 
   In file included from drivers/ddcci/ddcci.c:16:
   include/uapi/asm-generic/fcntl.h:166: note: this is the location of the previous definition
     166 | #define F_RDLCK         0
         | 
   In file included from include/uapi/linux/fcntl.h:5,
                    from include/linux/fcntl.h:6,
                    from include/linux/fs.h:26,
                    from drivers/ddcci/ddcci.c:20:
   arch/alpha/include/uapi/asm/fcntl.h:49: warning: "F_WRLCK" redefined
      49 | #define F_WRLCK         2
         | 
   In file included from drivers/ddcci/ddcci.c:16:
   include/uapi/asm-generic/fcntl.h:167: note: this is the location of the previous definition
     167 | #define F_WRLCK         1
         | 
   In file included from include/uapi/linux/fcntl.h:5,
                    from include/linux/fcntl.h:6,
                    from include/linux/fs.h:26,
                    from drivers/ddcci/ddcci.c:20:
   arch/alpha/include/uapi/asm/fcntl.h:50: warning: "F_UNLCK" redefined
      50 | #define F_UNLCK         8
         | 
   In file included from drivers/ddcci/ddcci.c:16:
   include/uapi/asm-generic/fcntl.h:168: note: this is the location of the previous definition
     168 | #define F_UNLCK         2
         | 
   In file included from include/uapi/linux/fcntl.h:5,
                    from include/linux/fcntl.h:6,
                    from include/linux/fs.h:26,
                    from drivers/ddcci/ddcci.c:20:
   arch/alpha/include/uapi/asm/fcntl.h:53: warning: "F_EXLCK" redefined
      53 | #define F_EXLCK         16      /* or 3 */
         | 
   In file included from drivers/ddcci/ddcci.c:16:
   include/uapi/asm-generic/fcntl.h:173: note: this is the location of the previous definition
     173 | #define F_EXLCK         4       /* or 3 */
         | 
   In file included from include/uapi/linux/fcntl.h:5,
                    from include/linux/fcntl.h:6,
                    from include/linux/fs.h:26,
                    from drivers/ddcci/ddcci.c:20:
   arch/alpha/include/uapi/asm/fcntl.h:54: warning: "F_SHLCK" redefined
      54 | #define F_SHLCK         32      /* or 4 */
         | 
   In file included from drivers/ddcci/ddcci.c:16:
   include/uapi/asm-generic/fcntl.h:174: note: this is the location of the previous definition
     174 | #define F_SHLCK         8       /* or 4 */
         | 
   drivers/ddcci/ddcci.c: In function 'ddcci_modalias_clean':
   drivers/ddcci/ddcci.c:76:17: error: expected '}' before 'else'
      76 |                 else if (c < '0' || (c > '9' && c < 'A') || (c > 'Z' && c < 'a') || c > 'z')
         |                 ^~~~

vim +/O_CREAT +5 arch/alpha/include/uapi/asm/fcntl.h

^1da177e4c3f41 include/asm-alpha/fcntl.h           Linus Torvalds    2005-04-16   4  
^1da177e4c3f41 include/asm-alpha/fcntl.h           Linus Torvalds    2005-04-16  @5  #define O_CREAT		 01000	/* not fcntl */
^1da177e4c3f41 include/asm-alpha/fcntl.h           Linus Torvalds    2005-04-16  @6  #define O_TRUNC		 02000	/* not fcntl */
^1da177e4c3f41 include/asm-alpha/fcntl.h           Linus Torvalds    2005-04-16  @7  #define O_EXCL		 04000	/* not fcntl */
^1da177e4c3f41 include/asm-alpha/fcntl.h           Linus Torvalds    2005-04-16  @8  #define O_NOCTTY	010000	/* not fcntl */
^1da177e4c3f41 include/asm-alpha/fcntl.h           Linus Torvalds    2005-04-16   9  
^1da177e4c3f41 include/asm-alpha/fcntl.h           Linus Torvalds    2005-04-16 @10  #define O_NONBLOCK	 00004
^1da177e4c3f41 include/asm-alpha/fcntl.h           Linus Torvalds    2005-04-16 @11  #define O_APPEND	 00010
6b2f3d1f769be5 arch/alpha/include/asm/fcntl.h      Christoph Hellwig 2009-10-27 @12  #define O_DSYNC		040000	/* used to be O_SYNC, see below */
^1da177e4c3f41 include/asm-alpha/fcntl.h           Linus Torvalds    2005-04-16 @13  #define O_DIRECTORY	0100000	/* must be a directory */
^1da177e4c3f41 include/asm-alpha/fcntl.h           Linus Torvalds    2005-04-16 @14  #define O_NOFOLLOW	0200000 /* don't follow links */
^1da177e4c3f41 include/asm-alpha/fcntl.h           Linus Torvalds    2005-04-16 @15  #define O_LARGEFILE	0400000 /* will be set by the kernel on every open */
^1da177e4c3f41 include/asm-alpha/fcntl.h           Linus Torvalds    2005-04-16 @16  #define O_DIRECT	02000000 /* direct disk access - should check with OSF/1 */
^1da177e4c3f41 include/asm-alpha/fcntl.h           Linus Torvalds    2005-04-16 @17  #define O_NOATIME	04000000
620b5e68ee89ba include/asm-alpha/fcntl.h           Richard Henderson 2007-08-08 @18  #define O_CLOEXEC	010000000 /* set close_on_exec */
6b2f3d1f769be5 arch/alpha/include/asm/fcntl.h      Christoph Hellwig 2009-10-27  19  /*
76b7e0058d09f8 arch/alpha/include/asm/fcntl.h      Christoph Hellwig 2009-12-17  20   * Before Linux 2.6.33 only O_DSYNC semantics were implemented, but using
6b2f3d1f769be5 arch/alpha/include/asm/fcntl.h      Christoph Hellwig 2009-10-27  21   * the O_SYNC flag.  We continue to use the existing numerical value
6b2f3d1f769be5 arch/alpha/include/asm/fcntl.h      Christoph Hellwig 2009-10-27  22   * for O_DSYNC semantics now, but using the correct symbolic name for it.
6b2f3d1f769be5 arch/alpha/include/asm/fcntl.h      Christoph Hellwig 2009-10-27  23   * This new value is used to request true Posix O_SYNC semantics.  It is
6b2f3d1f769be5 arch/alpha/include/asm/fcntl.h      Christoph Hellwig 2009-10-27  24   * defined in this strange way to make sure applications compiled against
6b2f3d1f769be5 arch/alpha/include/asm/fcntl.h      Christoph Hellwig 2009-10-27  25   * new headers get at least O_DSYNC semantics on older kernels.
6b2f3d1f769be5 arch/alpha/include/asm/fcntl.h      Christoph Hellwig 2009-10-27  26   *
6b2f3d1f769be5 arch/alpha/include/asm/fcntl.h      Christoph Hellwig 2009-10-27  27   * This has the nice side-effect that we can simply test for O_DSYNC
6b2f3d1f769be5 arch/alpha/include/asm/fcntl.h      Christoph Hellwig 2009-10-27  28   * wherever we do not care if O_DSYNC or O_SYNC is used.
6b2f3d1f769be5 arch/alpha/include/asm/fcntl.h      Christoph Hellwig 2009-10-27  29   *
6b2f3d1f769be5 arch/alpha/include/asm/fcntl.h      Christoph Hellwig 2009-10-27  30   * Note: __O_SYNC must never be used directly.
6b2f3d1f769be5 arch/alpha/include/asm/fcntl.h      Christoph Hellwig 2009-10-27  31   */
6b2f3d1f769be5 arch/alpha/include/asm/fcntl.h      Christoph Hellwig 2009-10-27 @32  #define __O_SYNC	020000000
6b2f3d1f769be5 arch/alpha/include/asm/fcntl.h      Christoph Hellwig 2009-10-27  33  #define O_SYNC		(__O_SYNC|O_DSYNC)
^1da177e4c3f41 include/asm-alpha/fcntl.h           Linus Torvalds    2005-04-16  34  
5229645bdc35f1 arch/alpha/include/asm/fcntl.h      Stephen Rothwell  2011-03-16 @35  #define O_PATH		040000000
bb458c644a59db arch/alpha/include/uapi/asm/fcntl.h Al Viro           2013-07-13 @36  #define __O_TMPFILE	0100000000
5229645bdc35f1 arch/alpha/include/asm/fcntl.h      Stephen Rothwell  2011-03-16  37  
^1da177e4c3f41 include/asm-alpha/fcntl.h           Linus Torvalds    2005-04-16 @38  #define F_GETLK		7
^1da177e4c3f41 include/asm-alpha/fcntl.h           Linus Torvalds    2005-04-16 @39  #define F_SETLK		8
^1da177e4c3f41 include/asm-alpha/fcntl.h           Linus Torvalds    2005-04-16 @40  #define F_SETLKW	9
^1da177e4c3f41 include/asm-alpha/fcntl.h           Linus Torvalds    2005-04-16  41  
^1da177e4c3f41 include/asm-alpha/fcntl.h           Linus Torvalds    2005-04-16 @42  #define F_SETOWN	5	/*  for sockets. */
^1da177e4c3f41 include/asm-alpha/fcntl.h           Linus Torvalds    2005-04-16 @43  #define F_GETOWN	6	/*  for sockets. */
^1da177e4c3f41 include/asm-alpha/fcntl.h           Linus Torvalds    2005-04-16  44  #define F_SETSIG	10	/*  for sockets. */
^1da177e4c3f41 include/asm-alpha/fcntl.h           Linus Torvalds    2005-04-16  45  #define F_GETSIG	11	/*  for sockets. */
^1da177e4c3f41 include/asm-alpha/fcntl.h           Linus Torvalds    2005-04-16  46  
^1da177e4c3f41 include/asm-alpha/fcntl.h           Linus Torvalds    2005-04-16  47  /* for posix fcntl() and lockf() */
^1da177e4c3f41 include/asm-alpha/fcntl.h           Linus Torvalds    2005-04-16 @48  #define F_RDLCK		1
^1da177e4c3f41 include/asm-alpha/fcntl.h           Linus Torvalds    2005-04-16 @49  #define F_WRLCK		2
^1da177e4c3f41 include/asm-alpha/fcntl.h           Linus Torvalds    2005-04-16 @50  #define F_UNLCK		8
^1da177e4c3f41 include/asm-alpha/fcntl.h           Linus Torvalds    2005-04-16  51  
^1da177e4c3f41 include/asm-alpha/fcntl.h           Linus Torvalds    2005-04-16  52  /* for old implementation of bsd flock () */
^1da177e4c3f41 include/asm-alpha/fcntl.h           Linus Torvalds    2005-04-16 @53  #define F_EXLCK		16	/* or 3 */
^1da177e4c3f41 include/asm-alpha/fcntl.h           Linus Torvalds    2005-04-16 @54  #define F_SHLCK		32	/* or 4 */
^1da177e4c3f41 include/asm-alpha/fcntl.h           Linus Torvalds    2005-04-16  55  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

#5 lore raw
In reply to Yusuf Khan
Thank you for the patch! Yet something to improve:

Hi Yusuf,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linux/master]
[also build test ERROR on staging/staging-testing linus/master v5.17-rc5] [cannot apply to next-20220225]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Yusuf-Khan/drivers-ddcci-upstream-DDCCI-driver/20220226-120531
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 2c271fe77d52a0555161926c232cd5bc07178b39
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20220226/[email protected]/config)
compiler: sh4-linux-gcc (GCC) 11.2.0

reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/7eb8029b70584acc0e9ce82dfdcff13c5496f544
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Yusuf-Khan/drivers-ddcci-upstream-DDCCI-driver/20220226-120531 git checkout 7eb8029b70584acc0e9ce82dfdcff13c5496f544
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=sh SHELL=/bin/bash drivers/ddcci/

If you fix the issue, kindly add following tag as appropriate

All error/warnings (new ones prefixed by >>):

drivers/ddcci/ddcci.c: In function 'ddcci_modalias_clean':

>> drivers/ddcci/ddcci.c:76:17: error: expected '}' before 'else'
      76 |                 else if (c < '0' || (c > '9' && c < 'A') || (c > 'Z' && c < 'a') || c > 'z')
         |                 ^~~~
--
   drivers/ddcci/ddcci-backlight.c: In function 'ddcci_monitor_next_vcp_item':
>> drivers/ddcci/ddcci-backlight.c:168:17: error: expected '}' before 'else'
     168 |                 else if (depth > 0) {
         |                 ^~~~
>> drivers/ddcci/ddcci-backlight.c:186:13: error: invalid storage class for function 'ddcci_monitor_find_vcp'
     186 | static bool ddcci_monitor_find_vcp(unsigned char vcp, const char *s)
         |             ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/ddcci/ddcci-backlight.c:186:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
     186 | static bool ddcci_monitor_find_vcp(unsigned char vcp, const char *s)
         | ^~~~~~
>> drivers/ddcci/ddcci-backlight.c:212:12: error: invalid storage class for function 'ddcci_backlight_create_symlink'
     212 | static int ddcci_backlight_create_symlink(struct ddcci_device *ddcci_dev)
         |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/ddcci/ddcci-backlight.c:240:12: error: invalid storage class for function 'ddcci_backlight_remove_symlink'
     240 | static int ddcci_backlight_remove_symlink(struct ddcci_device *ddcci_dev)
         |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/ddcci/ddcci-backlight.c:274:12: error: invalid storage class for function 'ddcci_monitor_probe'
     274 | static int ddcci_monitor_probe(struct ddcci_device *dev,
         |            ^~~~~~~~~~~~~~~~~~~
>> drivers/ddcci/ddcci-backlight.c:377:12: error: invalid storage class for function 'ddcci_monitor_remove'
     377 | static int ddcci_monitor_remove(struct ddcci_device *dev)
         |            ^~~~~~~~~~~~~~~~~~~~
>> drivers/ddcci/ddcci-backlight.c:396:27: error: initializer element is not constant
     396 |         .probe          = ddcci_monitor_probe,
         |                           ^~~~~~~~~~~~~~~~~~~
   drivers/ddcci/ddcci-backlight.c:396:27: note: (near initialization for 'ddcci_backlight_driver.probe')
   drivers/ddcci/ddcci-backlight.c:397:27: error: initializer element is not constant
     397 |         .remove         = ddcci_monitor_remove,
         |                           ^~~~~~~~~~~~~~~~~~~~
   drivers/ddcci/ddcci-backlight.c:397:27: note: (near initialization for 'ddcci_backlight_driver.remove')
   In file included from include/linux/device.h:32,
                    from include/linux/backlight.h:12,
                    from drivers/ddcci/ddcci-backlight.c:16:
>> drivers/ddcci/ddcci-backlight.c:400:21: error: invalid storage class for function 'ddcci_backlight_driver_init'
     400 | module_ddcci_driver(ddcci_backlight_driver);
         |                     ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/device/driver.h:260:19: note: in definition of macro 'module_driver'
     260 | static int __init __driver##_init(void) \
         |                   ^~~~~~~~
   drivers/ddcci/ddcci-backlight.c:400:1: note: in expansion of macro 'module_ddcci_driver'
     400 | module_ddcci_driver(ddcci_backlight_driver);
         | ^~~~~~~~~~~~~~~~~~~
   In file included from include/linux/device/driver.h:21,
                    from include/linux/device.h:32,
                    from include/linux/backlight.h:12,
                    from drivers/ddcci/ddcci-backlight.c:16:
>> include/linux/module.h:131:49: error: invalid storage class for function '__inittest'
     131 |         static inline initcall_t __maybe_unused __inittest(void)                \
         |                                                 ^~~~~~~~~~
   include/linux/device/driver.h:264:1: note: in expansion of macro 'module_init'
     264 | module_init(__driver##_init); \
         | ^~~~~~~~~~~
   include/linux/ddcci.h:138:9: note: in expansion of macro 'module_driver'
     138 |         module_driver(__ddcci_driver, ddcci_add_driver, \
         |         ^~~~~~~~~~~~~
   drivers/ddcci/ddcci-backlight.c:400:1: note: in expansion of macro 'module_ddcci_driver'
     400 | module_ddcci_driver(ddcci_backlight_driver);
         | ^~~~~~~~~~~~~~~~~~~
>> drivers/ddcci/ddcci-backlight.c:400:1: warning: 'alias' attribute ignored [-Wattributes]
   In file included from include/linux/device.h:32,
                    from include/linux/backlight.h:12,
                    from drivers/ddcci/ddcci-backlight.c:16:
>> drivers/ddcci/ddcci-backlight.c:400:21: error: invalid storage class for function 'ddcci_backlight_driver_exit'
     400 | module_ddcci_driver(ddcci_backlight_driver);
         |                     ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/device/driver.h:265:20: note: in definition of macro 'module_driver'
     265 | static void __exit __driver##_exit(void) \
         |                    ^~~~~~~~
   drivers/ddcci/ddcci-backlight.c:400:1: note: in expansion of macro 'module_ddcci_driver'
     400 | module_ddcci_driver(ddcci_backlight_driver);
         | ^~~~~~~~~~~~~~~~~~~
>> include/linux/device/driver.h:265:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
     265 | static void __exit __driver##_exit(void) \
         | ^~~~~~
   include/linux/ddcci.h:138:9: note: in expansion of macro 'module_driver'
     138 |         module_driver(__ddcci_driver, ddcci_add_driver, \
         |         ^~~~~~~~~~~~~
   drivers/ddcci/ddcci-backlight.c:400:1: note: in expansion of macro 'module_ddcci_driver'
     400 | module_ddcci_driver(ddcci_backlight_driver);
         | ^~~~~~~~~~~~~~~~~~~
   In file included from include/linux/device/driver.h:21,
                    from include/linux/device.h:32,
                    from include/linux/backlight.h:12,
                    from drivers/ddcci/ddcci-backlight.c:16:
>> include/linux/module.h:139:49: error: invalid storage class for function '__exittest'
     139 |         static inline exitcall_t __maybe_unused __exittest(void)                \
         |                                                 ^~~~~~~~~~
   include/linux/device/driver.h:269:1: note: in expansion of macro 'module_exit'
     269 | module_exit(__driver##_exit);
         | ^~~~~~~~~~~
   include/linux/ddcci.h:138:9: note: in expansion of macro 'module_driver'
     138 |         module_driver(__ddcci_driver, ddcci_add_driver, \
         |         ^~~~~~~~~~~~~
   drivers/ddcci/ddcci-backlight.c:400:1: note: in expansion of macro 'module_ddcci_driver'
     400 | module_ddcci_driver(ddcci_backlight_driver);
         | ^~~~~~~~~~~~~~~~~~~
>> drivers/ddcci/ddcci-backlight.c:400:1: warning: 'alias' attribute ignored [-Wattributes]
   In file included from include/linux/module.h:22,
                    from include/linux/device/driver.h:21,
                    from include/linux/device.h:32,
                    from include/linux/backlight.h:12,
                    from drivers/ddcci/ddcci-backlight.c:16:
>> include/linux/moduleparam.h:409:45: error: invalid storage class for function '__check_convenience_symlink'
     409 |         static inline type __always_unused *__check_##name(void) { return(p); }
         |                                             ^~~~~~~~
   include/linux/moduleparam.h:468:35: note: in expansion of macro '__param_check'
     468 | #define param_check_bool(name, p) __param_check(name, p, bool)
         |                                   ^~~~~~~~~~~~~
   include/linux/moduleparam.h:150:9: note: in expansion of macro 'param_check_bool'
     150 |         param_check_##type(name, &(value));                                \
         |         ^~~~~~~~~~~~
   include/linux/moduleparam.h:127:9: note: in expansion of macro 'module_param_named'
     127 |         module_param_named(name, name, type, perm)
         |         ^~~~~~~~~~~~~~~~~~
   drivers/ddcci/ddcci-backlight.c:403:1: note: in expansion of macro 'module_param'
     403 | module_param(convenience_symlink, bool, 0644);
         | ^~~~~~~~~~~~
   include/linux/moduleparam.h:409:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
     409 |         static inline type __always_unused *__check_##name(void) { return(p); }
         |         ^~~~~~
   include/linux/moduleparam.h:468:35: note: in expansion of macro '__param_check'
     468 | #define param_check_bool(name, p) __param_check(name, p, bool)
         |                                   ^~~~~~~~~~~~~
   include/linux/moduleparam.h:150:9: note: in expansion of macro 'param_check_bool'
     150 |         param_check_##type(name, &(value));                                \
         |         ^~~~~~~~~~~~
   include/linux/moduleparam.h:127:9: note: in expansion of macro 'module_param_named'
     127 |         module_param_named(name, name, type, perm)
         |         ^~~~~~~~~~~~~~~~~~
   drivers/ddcci/ddcci-backlight.c:403:1: note: in expansion of macro 'module_param'
     403 | module_param(convenience_symlink, bool, 0644);
         | ^~~~~~~~~~~~
   include/linux/moduleparam.h:289:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
     289 |         static const char __param_str_##name[] = prefix #name;          \
         |         ^~~~~~
   include/linux/moduleparam.h:176:9: note: in expansion of macro '__module_param_call'
     176 |         __module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, -1, 0)
         |         ^~~~~~~~~~~~~~~~~~~
   include/linux/moduleparam.h:151:9: note: in expansion of macro 'module_param_cb'
     151 |         module_param_cb(name, &param_ops_##type, &value, perm);            \
         |         ^~~~~~~~~~~~~~~
   include/linux/moduleparam.h:127:9: note: in expansion of macro 'module_param_named'
     127 |         module_param_named(name, name, type, perm)
         |         ^~~~~~~~~~~~~~~~~~
   drivers/ddcci/ddcci-backlight.c:403:1: note: in expansion of macro 'module_param'
     403 | module_param(convenience_symlink, bool, 0644);
         | ^~~~~~~~~~~~
>> drivers/ddcci/ddcci-backlight.c:411:1: error: expected declaration or statement at end of input
     411 | MODULE_ALIAS("ddcci:monitor-*-*-*-*");
         | ^~~~~~~~~~~~

vim +76 drivers/ddcci/ddcci.c

    65	
    66	/* Replace non-alphanumeric characters in a string (used for modalias) */
    67	static void ddcci_modalias_clean(char *string, size_t n, char replacement)
    68	{
    69		int i;
    70	
    71		for (i = 0; i < n; ++i) {
    72			char c = string[i];
    73	
    74			if (c == 0) {
    75				return;
  > 76			else if (c < '0' || (c > '9' && c < 'A') || (c > 'Z' && c < 'a') || c > 'z')
    77				string[i] = replacement;
    78		}
    79	}
    80	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]