From: kernel test robot <lkp@intel.com>
To: "Martin Zaťovič" <m.zatovic1@gmail.com>, linux-kernel@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org,
gregkh@linuxfoundation.org, beanhuo@micron.com,
nipun.gupta@amd.com, linus.walleij@linaro.org, mwen@igalia.com,
bvanassche@acm.org, arnd@arndb.de, ogabbay@kernel.org,
linux@zary.sk, jacek.lawrynowicz@linux.intel.com,
geert+renesas@glider.be, benjamin.tissoires@redhat.com,
masahiroy@kernel.org, yangyicong@hisilicon.com,
devicetree@vger.kernel.org,
"Martin Zaťovič" <m.zatovic1@gmail.com>
Subject: Re: [PATCHv4 4/4] wiegand: add Wiegand GPIO bitbanged controller driver
Date: Thu, 11 May 2023 04:16:30 +0800 [thread overview]
Message-ID: <202305110450.jjNwIYfp-lkp@intel.com> (raw)
In-Reply-To: <20230510162243.95820-5-m.zatovic1@gmail.com>
Hi Martin,
kernel test robot noticed the following build warnings:
[auto build test WARNING on robh/for-next]
[also build test WARNING on linus/master v6.4-rc1 next-20230510]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Martin-Za-ovi/dt-bindings-wiegand-add-Wiegand-controller-common-properties/20230511-002708
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
patch link: https://lore.kernel.org/r/20230510162243.95820-5-m.zatovic1%40gmail.com
patch subject: [PATCHv4 4/4] wiegand: add Wiegand GPIO bitbanged controller driver
config: sparc-allyesconfig (https://download.01.org/0day-ci/archive/20230511/202305110450.jjNwIYfp-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 12.1.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/intel-lab-lkp/linux/commit/3eb47f0de6aecc78d72c144b36ccd97f22d908c5
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Martin-Za-ovi/dt-bindings-wiegand-add-Wiegand-controller-common-properties/20230511-002708
git checkout 3eb47f0de6aecc78d72c144b36ccd97f22d908c5
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sparc olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sparc SHELL=/bin/bash drivers/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202305110450.jjNwIYfp-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/wiegand/wiegand-gpio.c:70:6: warning: no previous prototype for 'wiegand_gpio_send_bit' [-Wmissing-prototypes]
70 | void wiegand_gpio_send_bit(struct wiegand_gpio *wiegand_gpio, bool value, bool last)
| ^~~~~~~~~~~~~~~~~~~~~
>> drivers/wiegand/wiegand-gpio.c:111:5: warning: no previous prototype for 'wiegand_gpio_transfer_message' [-Wmissing-prototypes]
111 | int wiegand_gpio_transfer_message(struct wiegand_controller *ctlr)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/wiegand_gpio_send_bit +70 drivers/wiegand/wiegand-gpio.c
63
64 /*
65 * To send a bit of value 1 following the wiegand protocol, one must set
66 * the wiegand_data_hi to low for the duration of pulse. Similarly to send
67 * a bit of value 0, the wiegand_data_lo is set to low for pulse duration.
68 * This way the two lines are never low at the same time.
69 */
> 70 void wiegand_gpio_send_bit(struct wiegand_gpio *wiegand_gpio, bool value, bool last)
71 {
72 u32 sleep_len;
73 u32 pulse_len = wiegand_gpio->ctlr->pulse_len;
74 u32 interval_len = wiegand_gpio->ctlr->interval_len;
75 u32 frame_gap = wiegand_gpio->ctlr->frame_gap;
76 struct gpio_desc *gpio = value ? wiegand_gpio->data1_gpio : wiegand_gpio->data0_gpio;
77
78 gpiod_set_value_cansleep(gpio, 0);
79 udelay(pulse_len);
80 gpiod_set_value_cansleep(gpio, 1);
81
82 if (last)
83 sleep_len = frame_gap - pulse_len;
84 else
85 sleep_len = interval_len - pulse_len;
86
87 if (sleep_len < 10)
88 udelay(sleep_len);
89 else if (sleep_len < 100)
90 usleep_range(sleep_len - UP_TO_100_USEC_DEVIATION,
91 sleep_len + UP_TO_100_USEC_DEVIATION);
92 else
93 usleep_range(sleep_len - MORE_THAN_100_USEC_DEVIATION,
94 sleep_len + MORE_THAN_100_USEC_DEVIATION);
95 }
96
97 static int wiegand_gpio_write_by_bits(struct wiegand_gpio *wiegand_gpio, u16 bitlen)
98 {
99 size_t i;
100 bool bit_value, is_last_bit;
101
102 for (i = 0; i < bitlen; i++) {
103 bit_value = test_bit(i, wiegand_gpio->ctlr->data_bitmap);
104 is_last_bit = (i + 1) == bitlen;
105 wiegand_gpio_send_bit(wiegand_gpio, bit_value, is_last_bit);
106 }
107
108 return 0;
109 }
110
> 111 int wiegand_gpio_transfer_message(struct wiegand_controller *ctlr)
112 {
113 struct wiegand_gpio *wiegand_gpio = wiegand_primary_get_devdata(ctlr);
114 u8 msg_bitlen = ctlr->payload_len;
115
116 wiegand_gpio_write_by_bits(wiegand_gpio, msg_bitlen);
117
118 return 0;
119 }
120
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
next prev parent reply other threads:[~2023-05-10 20:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-10 16:22 [PATCHv4 0/4] Wiegand bus driver and GPIO bitbanged Wiegand Martin Zaťovič
2023-05-10 16:22 ` [PATCHv4 1/4] dt-bindings: wiegand: add Wiegand controller common properties Martin Zaťovič
2023-05-10 16:22 ` [PATCHv4 2/4] wiegand: add Wiegand bus driver Martin Zaťovič
2023-06-22 13:20 ` Andy Shevchenko
2023-05-10 16:22 ` [PATCHv4 3/4] dt-bindings: wiegand: add GPIO bitbanged Wiegand controller Martin Zaťovič
2023-05-10 16:33 ` Conor Dooley
2023-05-11 5:30 ` Krzysztof Kozlowski
2023-05-10 16:22 ` [PATCHv4 4/4] wiegand: add Wiegand GPIO bitbanged controller driver Martin Zaťovič
2023-05-10 20:16 ` kernel test robot [this message]
2023-06-22 13:39 ` Andy Shevchenko
2023-06-22 12:36 ` [PATCHv4 0/4] Wiegand bus driver and GPIO bitbanged Wiegand Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202305110450.jjNwIYfp-lkp@intel.com \
--to=lkp@intel.com \
--cc=arnd@arndb.de \
--cc=beanhuo@micron.com \
--cc=benjamin.tissoires@redhat.com \
--cc=bvanassche@acm.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=geert+renesas@glider.be \
--cc=gregkh@linuxfoundation.org \
--cc=jacek.lawrynowicz@linux.intel.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@zary.sk \
--cc=m.zatovic1@gmail.com \
--cc=masahiroy@kernel.org \
--cc=mwen@igalia.com \
--cc=nipun.gupta@amd.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=ogabbay@kernel.org \
--cc=robh+dt@kernel.org \
--cc=yangyicong@hisilicon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox