[intel-lts:5.10/preempt-rt 11000/17939] drivers/media/i2c/lt6911uxc.c:722:13: warning: variable 'hblank' set but not used
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.10/preempt-rt
head: 87730b5bba3003ee22dcfa6d5d7b118d3d433611
commit: 367a342a05c249be8a0ea5e9d1e9dd5669a02abf [11000/17939] media: lt6911uxc:add sensor driver
config: powerpc64-randconfig-r004-20211018 (attached as .config)
compiler: powerpc64-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/intel/linux-intel-lts/commit/367a342a05c249be8a0ea5e9d...
git remote add intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-lts 5.10/preempt-rt
git checkout 367a342a05c249be8a0ea5e9d1e9dd5669a02abf
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/media/i2c/lt6911uxc.c: In function 'lt6911uxc_init_controls':
>> drivers/media/i2c/lt6911uxc.c:722:13: warning: variable 'hblank' set but not used [-Wunused-but-set-variable]
722 | s64 hblank;
| ^~~~~~
drivers/media/i2c/lt6911uxc.c: At top level:
>> drivers/media/i2c/lt6911uxc.c:1140:27: warning: initialized field overwritten [-Woverride-init]
1140 | .s_stream = lt6911uxc_set_stream,
| ^~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/lt6911uxc.c:1140:27: note: (near initialization for 'lt6911uxc_video_ops.s_stream')
drivers/media/i2c/lt6911uxc.c:499:12: warning: 'lt6911uxc_query_dv_timings' defined but not used [-Wunused-function]
499 | static int lt6911uxc_query_dv_timings(struct v4l2_subdev *sd,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/lt6911uxc.c:468:12: warning: 'lt6911uxc_s_dv_timings' defined but not used [-Wunused-function]
468 | static int lt6911uxc_s_dv_timings(struct v4l2_subdev *sd,
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/lt6911uxc.c:238:32: warning: 'lt6911uxc_ev_source_change' defined but not used [-Wunused-const-variable=]
238 | static const struct v4l2_event lt6911uxc_ev_source_change = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/lt6911uxc.c:116:31: warning: 'default_timing' defined but not used [-Wunused-variable]
116 | static struct v4l2_dv_timings default_timing = V4L2_DV_BT_CEA_3840X2160P30;
| ^~~~~~~~~~~~~~
vim +/hblank +722 drivers/media/i2c/lt6911uxc.c
717
718 static int lt6911uxc_init_controls(struct lt6911uxc_state *lt6911uxc)
719 {
720 struct i2c_client *client = v4l2_get_subdevdata(<6911uxc->sd);
721 struct v4l2_ctrl_handler *ctrl_hdlr;
> 722 s64 hblank;
723 struct v4l2_ctrl_config cfg = { 0 };
724 int ret;
725
726 ctrl_hdlr = <6911uxc->ctrl_handler;
727 ret = v4l2_ctrl_handler_init(ctrl_hdlr, 8);
728 if (ret)
729 return ret;
730
731 ctrl_hdlr->lock = <6911uxc->mutex;
732 lt6911uxc->link_freq =
733 v4l2_ctrl_new_int_menu(ctrl_hdlr,
734 <6911uxc_ctrl_ops,
735 V4L2_CID_LINK_FREQ,
736 sizeof(lt6911uxc->cur_mode->pixel_clk),
737 0, (s64 *)<6911uxc->cur_mode->pixel_clk);
738 if (ctrl_hdlr->error) {
739 dev_dbg(&client->dev, "Set ctrl_hdlr, err=%d.\n",
740 ctrl_hdlr->error);
741 return ctrl_hdlr->error;
742 }
743 if (lt6911uxc->link_freq)
744 lt6911uxc->link_freq->flags |= V4L2_CTRL_FLAG_READ_ONLY;
745
746 lt6911uxc->vblank = v4l2_ctrl_new_std(ctrl_hdlr,
747 <6911uxc_ctrl_ops,
748 V4L2_CID_VBLANK, 0, 1, 1, 1);
749 if (ctrl_hdlr->error) {
750 dev_dbg(&client->dev, "Set ctrl_hdlr, err=%d.\n",
751 ctrl_hdlr->error);
752 return ctrl_hdlr->error;
753 }
754
755 lt6911uxc->analogue_gain = v4l2_ctrl_new_std(ctrl_hdlr,
756 <6911uxc_ctrl_ops,
757 V4L2_CID_ANALOGUE_GAIN, 0, 1, 1, 1);
758 if (ctrl_hdlr->error) {
759 dev_dbg(&client->dev, "Set ctrl_hdlr, err=%d.\n",
760 ctrl_hdlr->error);
761 return ctrl_hdlr->error;
762 }
763
764 lt6911uxc->digital_gain = v4l2_ctrl_new_std(ctrl_hdlr,
765 <6911uxc_ctrl_ops,
766 V4L2_CID_DIGITAL_GAIN, 0, 1, 1, 1);
767 if (ctrl_hdlr->error) {
768 dev_dbg(&client->dev, "Set ctrl_hdlr, err=%d.\n",
769 ctrl_hdlr->error);
770 return ctrl_hdlr->error;
771 }
772
773 lt6911uxc->exposure = v4l2_ctrl_new_std(ctrl_hdlr,
774 <6911uxc_ctrl_ops,
775 V4L2_CID_EXPOSURE, 0, 1, 1, 1);
776 if (ctrl_hdlr->error) {
777 dev_dbg(&client->dev, "Set ctrl_hdlr, err=%d.\n",
778 ctrl_hdlr->error);
779 return ctrl_hdlr->error;
780 }
781
782 cfg.ops = <6911uxc_ctrl_ops;
783 cfg.id = V4L2_CID_MIPI_LANES;
784 cfg.name = "V4L2_CID_MIPI_LANES";
785 cfg.type = V4L2_CTRL_TYPE_INTEGER;
786 cfg.max = 4; cfg.min = 2; cfg.step = 2; cfg.def = 4;
787 cfg.qmenu = 0; cfg.elem_size = 0;
788 lt6911uxc->mipi_lanes = v4l2_ctrl_new_custom(ctrl_hdlr, &cfg, NULL);
789 if (ctrl_hdlr->error) {
790 dev_dbg(&client->dev, "Set ctrl_hdlr, err=%d.\n",
791 ctrl_hdlr->error);
792 return ctrl_hdlr->error;
793 }
794
795 lt6911uxc_csi_port.def = lt6911uxc->platform_data->port;
796 lt6911uxc->csi_port =
797 v4l2_ctrl_new_custom(ctrl_hdlr, <6911uxc_csi_port, NULL);
798 if (ctrl_hdlr->error) {
799 dev_dbg(&client->dev, "Set ctrl_hdlr, err=%d.\n",
800 ctrl_hdlr->error);
801 return ctrl_hdlr->error;
802 }
803
804 lt6911uxc_i2c_bus.def = i2c_adapter_id(client->adapter);
805 lt6911uxc->i2c_bus =
806 v4l2_ctrl_new_custom(ctrl_hdlr, <6911uxc_i2c_bus, NULL);
807 if (ctrl_hdlr->error) {
808 dev_dbg(&client->dev, "Set ctrl_hdlr, err=%d.\n",
809 ctrl_hdlr->error);
810 return ctrl_hdlr->error;
811 }
812
813 lt6911uxc_i2c_id.def = client->addr;
814 lt6911uxc->i2c_id = v4l2_ctrl_new_custom(ctrl_hdlr,
815 <6911uxc_i2c_id, NULL);
816 if (ctrl_hdlr->error) {
817 dev_dbg(&client->dev, "Set ctrl_hdlr, err=%d.\n",
818 ctrl_hdlr->error);
819 return ctrl_hdlr->error;
820 }
821
822 lt6911uxc_i2c_slave_address.def =
823 lt6911uxc->platform_data->i2c_slave_address;
824 lt6911uxc->i2c_slave_address = v4l2_ctrl_new_custom(ctrl_hdlr,
825 <6911uxc_i2c_slave_address, NULL);
826 if (ctrl_hdlr->error) {
827 dev_dbg(&client->dev, "Set ctrl_hdlr, err=%d.\n",
828 ctrl_hdlr->error);
829 return ctrl_hdlr->error;
830 }
831
832 lt6911uxc_fps.def = lt6911uxc->cur_mode->fps;
833 lt6911uxc->fps = v4l2_ctrl_new_custom(ctrl_hdlr, <6911uxc_fps, NULL);
834 if (ctrl_hdlr->error) {
835 dev_dbg(&client->dev, "Set ctrl_hdlr, err=%d.\n",
836 ctrl_hdlr->error);
837 return ctrl_hdlr->error;
838 }
839
840 lt6911uxc_frame_interval.def = 1000 / lt6911uxc->cur_mode->fps;
841 lt6911uxc->frame_interval = v4l2_ctrl_new_custom(ctrl_hdlr,
842 <6911uxc_frame_interval, NULL);
843 if (ctrl_hdlr->error) {
844 dev_dbg(&client->dev, "Set ctrl_hdlr, err=%d.\n",
845 ctrl_hdlr->error);
846 return ctrl_hdlr->error;
847 }
848
849 lt6911uxc->pixel_rate = v4l2_ctrl_new_std(ctrl_hdlr,
850 <6911uxc_ctrl_ops,
851 V4L2_CID_PIXEL_RATE,
852 get_pixel_rate(lt6911uxc),
853 get_pixel_rate(lt6911uxc), 1,
854 get_pixel_rate(lt6911uxc));
855 if (ctrl_hdlr->error) {
856 dev_dbg(&client->dev, "Set ctrl_hdlr, err=%d.\n",
857 ctrl_hdlr->error);
858 return ctrl_hdlr->error;
859 }
860 if (lt6911uxc->pixel_rate)
861 lt6911uxc->pixel_rate->flags |= V4L2_CTRL_FLAG_READ_ONLY;
862
863 hblank = 1;
864 lt6911uxc->hblank = v4l2_ctrl_new_std(ctrl_hdlr,
865 <6911uxc_ctrl_ops,
866 V4L2_CID_HBLANK, 0, 1, 1, 1);
867 if (ctrl_hdlr->error) {
868 dev_dbg(&client->dev, "Set ctrl_hdlr, err=%d.\n",
869 ctrl_hdlr->error);
870 return ctrl_hdlr->error;
871 }
872 if (lt6911uxc->hblank)
873 lt6911uxc->hblank->flags |= V4L2_CTRL_FLAG_READ_ONLY;
874
875 /* custom v4l2 audio controls */
876 lt6911uxc->audio_sampling_rate_ctrl = v4l2_ctrl_new_custom(
877 ctrl_hdlr, <6911uxc_ctrl_audio_sampling_rate, NULL);
878 if (ctrl_hdlr->error) {
879 dev_dbg(&client->dev, "Set audio sampling rate ctrl, err=%d.\n",
880 ctrl_hdlr->error);
881 return ctrl_hdlr->error;
882 }
883 lt6911uxc->audio_present_ctrl = v4l2_ctrl_new_custom(ctrl_hdlr,
884 <6911uxc_ctrl_audio_present, NULL);
885 if (ctrl_hdlr->error) {
886 dev_dbg(&client->dev, "Set audio present ctrl, error = %d.\n",
887 ctrl_hdlr->error);
888 return ctrl_hdlr->error;
889 }
890
891 lt6911uxc->sd.ctrl_handler = ctrl_hdlr;
892 return 0;
893 }
894
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
Re: [PATCH] scsi:ufs:add quirk to keep write booster on
by kernel test robot
Hi Fengnan,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on mkp-scsi/for-next]
[also build test ERROR on jejb-scsi/for-next v5.15 next-20211110]
[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/Fengnan-Chang/scsi-ufs-add-quirk...
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: nios2-buildonly-randconfig-r006-20211111 (attached as .config)
compiler: nios2-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/d62a8caeaf6fc77b0e717c94db58080d3...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Fengnan-Chang/scsi-ufs-add-quirk-to-keep-write-booster-on/20211111-120016
git checkout d62a8caeaf6fc77b0e717c94db58080d3f1edb68
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=nios2
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/scsi/ufs/ufshcd.c: In function 'ufshcd_devfreq_scale':
>> drivers/scsi/ufs/ufshcd.c:1260:17: error: implicit declaration of function 'ufshcd_wb_ctrl'; did you mean 'ufshcd_writel'? [-Werror=implicit-function-declaration]
1260 | ufshcd_wb_ctrl(hba, scale_up);
| ^~~~~~~~~~~~~~
| ufshcd_writel
cc1: some warnings being treated as errors
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for SERIAL_CORE_CONSOLE
Depends on TTY && HAS_IOMEM
Selected by
- EARLY_PRINTK
vim +1260 drivers/scsi/ufs/ufshcd.c
1211
1212 /**
1213 * ufshcd_devfreq_scale - scale up/down UFS clocks and gear
1214 * @hba: per adapter instance
1215 * @scale_up: True for scaling up and false for scalin down
1216 *
1217 * Returns 0 for success,
1218 * Returns -EBUSY if scaling can't happen at this time
1219 * Returns non-zero for any other errors
1220 */
1221 static int ufshcd_devfreq_scale(struct ufs_hba *hba, bool scale_up)
1222 {
1223 int ret = 0;
1224 bool is_writelock = true;
1225
1226 ret = ufshcd_clock_scaling_prepare(hba);
1227 if (ret)
1228 return ret;
1229
1230 /* scale down the gear before scaling down clocks */
1231 if (!scale_up) {
1232 ret = ufshcd_scale_gear(hba, false);
1233 if (ret)
1234 goto out_unprepare;
1235 }
1236
1237 ret = ufshcd_scale_clks(hba, scale_up);
1238 if (ret) {
1239 if (!scale_up)
1240 ufshcd_scale_gear(hba, true);
1241 goto out_unprepare;
1242 }
1243
1244 /* scale up the gear after scaling up clocks */
1245 if (scale_up) {
1246 ret = ufshcd_scale_gear(hba, true);
1247 if (ret) {
1248 ufshcd_scale_clks(hba, false);
1249 goto out_unprepare;
1250 }
1251 }
1252
1253 /*
1254 * if no need UFS_DEVICE_QUIRK_KEEP_ON_WB, Enable Write
1255 * Booster if we have scaled up else disable it
1256 */
1257 if (!(hba->dev_quirks & UFS_DEVICE_QUIRK_KEEP_ON_WB)) {
1258 downgrade_write(&hba->clk_scaling_lock);
1259 is_writelock = false;
> 1260 ufshcd_wb_ctrl(hba, scale_up);
1261 }
1262
1263 out_unprepare:
1264 ufshcd_clock_scaling_unprepare(hba, is_writelock);
1265 return ret;
1266 }
1267
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
Re: [RFC PATCH v4 1/8] leds: add support for hardware driven LEDs
by kernel test robot
Hi Ansuel,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on net/master]
[also build test ERROR on linus/master next-20211110]
[cannot apply to pavel-leds/for-next robh/for-next net-next/master v5.15]
[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/Ansuel-Smith/Adds-support-for-PH...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git e5d5aadcf3cd59949316df49c27cb21788d7efe4
config: openrisc-buildonly-randconfig-r003-20211111 (attached as .config)
compiler: or1k-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/c56c3d000ada0de02ec9ecf03e9332773...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ansuel-Smith/Adds-support-for-PHY-LEDs-with-offload-triggers/20211111-093724
git checkout c56c3d000ada0de02ec9ecf03e93327733b91930
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=openrisc SHELL=/bin/bash drivers/i2c/ drivers/leds/ kernel/bpf/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/leds/led-triggers.c: In function 'led_trigger_set':
>> drivers/leds/led-triggers.c:198:29: error: 'struct led_classdev' has no member named 'hw_control_status'
198 | led_cdev->hw_control_status(led_cdev))
| ^~
>> drivers/leds/led-triggers.c:199:33: error: 'struct led_classdev' has no member named 'hw_control_stop'
199 | led_cdev->hw_control_stop(led_cdev);
| ^~
vim +198 drivers/leds/led-triggers.c
170
171 /* Caller must ensure led_cdev->trigger_lock held */
172 int led_trigger_set(struct led_classdev *led_cdev, struct led_trigger *trig)
173 {
174 char *event = NULL;
175 char *envp[2];
176 const char *name;
177 int ret;
178
179 if (!led_cdev->trigger && !trig)
180 return 0;
181
182 name = trig ? trig->name : "none";
183 event = kasprintf(GFP_KERNEL, "TRIGGER=%s", name);
184
185 /* Remove any existing trigger */
186 if (led_cdev->trigger) {
187 spin_lock(&led_cdev->trigger->leddev_list_lock);
188 list_del_rcu(&led_cdev->trig_list);
189 spin_unlock(&led_cdev->trigger->leddev_list_lock);
190
191 /* ensure it's no longer visible on the led_cdevs list */
192 synchronize_rcu();
193
194 cancel_work_sync(&led_cdev->set_brightness_work);
195 led_stop_software_blink(led_cdev);
196 /* Disable hardware mode on trigger change if supported */
197 if ((led_cdev->flags & LED_HARDWARE_CONTROLLED) &&
> 198 led_cdev->hw_control_status(led_cdev))
> 199 led_cdev->hw_control_stop(led_cdev);
200 if (led_cdev->trigger->deactivate)
201 led_cdev->trigger->deactivate(led_cdev);
202 device_remove_groups(led_cdev->dev, led_cdev->trigger->groups);
203 led_cdev->trigger = NULL;
204 led_cdev->trigger_data = NULL;
205 led_cdev->activated = false;
206 led_set_brightness(led_cdev, LED_OFF);
207 }
208 if (trig) {
209 /* Make sure the trigger support the LED blink mode */
210 if (!led_trigger_is_supported(led_cdev, trig))
211 return -EINVAL;
212
213 spin_lock(&trig->leddev_list_lock);
214 list_add_tail_rcu(&led_cdev->trig_list, &trig->led_cdevs);
215 spin_unlock(&trig->leddev_list_lock);
216 led_cdev->trigger = trig;
217
218 if (trig->activate)
219 ret = trig->activate(led_cdev);
220 else
221 ret = 0;
222
223 if (ret)
224 goto err_activate;
225
226 ret = device_add_groups(led_cdev->dev, trig->groups);
227 if (ret) {
228 dev_err(led_cdev->dev, "Failed to add trigger attributes\n");
229 goto err_add_groups;
230 }
231 }
232
233 if (event) {
234 envp[0] = event;
235 envp[1] = NULL;
236 if (kobject_uevent_env(&led_cdev->dev->kobj, KOBJ_CHANGE, envp))
237 dev_err(led_cdev->dev,
238 "%s: Error sending uevent\n", __func__);
239 kfree(event);
240 }
241
242 return 0;
243
244 err_add_groups:
245
246 if (trig->deactivate)
247 trig->deactivate(led_cdev);
248 err_activate:
249
250 spin_lock(&led_cdev->trigger->leddev_list_lock);
251 list_del_rcu(&led_cdev->trig_list);
252 spin_unlock(&led_cdev->trigger->leddev_list_lock);
253 synchronize_rcu();
254 led_cdev->trigger = NULL;
255 led_cdev->trigger_data = NULL;
256 led_set_brightness(led_cdev, LED_OFF);
257 kfree(event);
258
259 return ret;
260 }
261 EXPORT_SYMBOL_GPL(led_trigger_set);
262
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
arch/arm/boot/compressed/fdt_check_mem_start.c:62:10: warning: no previous prototype for 'fdt_check_mem_start'
by kernel test robot
Hi Geert,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: cb690f5238d71f543f4ce874aa59237cf53a877c
commit: 0673cb38951215060d7993b43ad3c45cd413c2c3 ARM: 9045/1: uncompress: Validate start of physical memory against passed DTB
date: 9 months ago
config: arm-randconfig-r022-20210927 (attached as .config)
compiler: arm-linux-gnueabi-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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 0673cb38951215060d7993b43ad3c45cd413c2c3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> arch/arm/boot/compressed/fdt_check_mem_start.c:62:10: warning: no previous prototype for 'fdt_check_mem_start' [-Wmissing-prototypes]
62 | uint32_t fdt_check_mem_start(uint32_t mem_start, const void *fdt)
| ^~~~~~~~~~~~~~~~~~~
vim +/fdt_check_mem_start +62 arch/arm/boot/compressed/fdt_check_mem_start.c
46
47 /*
48 * Check the start of physical memory
49 *
50 * Traditionally, the start address of physical memory is obtained by masking
51 * the program counter. However, this does require that this address is a
52 * multiple of 128 MiB, precluding booting Linux on platforms where this
53 * requirement is not fulfilled.
54 * Hence validate the calculated address against the memory information in the
55 * DTB, and, if out-of-range, replace it by the real start address.
56 * To preserve backwards compatibility (systems reserving a block of memory
57 * at the start of physical memory, kdump, ...), the traditional method is
58 * always used if it yields a valid address.
59 *
60 * Return value: start address of physical memory to use
61 */
> 62 uint32_t fdt_check_mem_start(uint32_t mem_start, const void *fdt)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[hch-block:gendisk-flags 11/14] drivers/block/paride/pcd.c:895:54: error: 'pcd_mq_ops' undeclared; did you mean 'pcd_dops'?
by kernel test robot
tree: git://git.infradead.org/users/hch/block.git gendisk-flags
head: 92eeb4d1fe100e503ffd883bb003f676167b3f68
commit: 03b9d5d4dfb355829602cc1739de03841cfe1882 [11/14] block: remove GENHD_FL_EXT_DEVT
config: m68k-allmodconfig (attached as .config)
compiler: m68k-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
git remote add hch-block git://git.infradead.org/users/hch/block.git
git fetch --no-tags hch-block gendisk-flags
git checkout 03b9d5d4dfb355829602cc1739de03841cfe1882
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=m68k SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/block/paride/pcd.c: In function 'pcd_init_unit':
>> drivers/block/paride/pcd.c:895:54: error: 'pcd_mq_ops' undeclared (first use in this function); did you mean 'pcd_dops'?
895 | ret = blk_mq_alloc_sq_tag_set(&cd->tag_set, &pcd_mq_ops, 1,
| ^~~~~~~~~~
| pcd_dops
drivers/block/paride/pcd.c:895:54: note: each undeclared identifier is reported only once for each function it appears in
At top level:
>> drivers/block/paride/pcd.c:700:21: error: 'pcd_queue_rq' defined but not used [-Werror=unused-function]
700 | static blk_status_t pcd_queue_rq(struct blk_mq_hw_ctx *hctx,
| ^~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +895 drivers/block/paride/pcd.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 699
89c6b165096933 Jens Axboe 2018-10-15 @700 static blk_status_t pcd_queue_rq(struct blk_mq_hw_ctx *hctx,
89c6b165096933 Jens Axboe 2018-10-15 701 const struct blk_mq_queue_data *bd)
547b50a1fbc176 Omar Sandoval 2017-03-27 702 {
89c6b165096933 Jens Axboe 2018-10-15 703 struct pcd_unit *cd = hctx->queue->queuedata;
89c6b165096933 Jens Axboe 2018-10-15 704
89c6b165096933 Jens Axboe 2018-10-15 705 if (rq_data_dir(bd->rq) != READ) {
89c6b165096933 Jens Axboe 2018-10-15 706 blk_mq_start_request(bd->rq);
89c6b165096933 Jens Axboe 2018-10-15 707 return BLK_STS_IOERR;
89c6b165096933 Jens Axboe 2018-10-15 708 }
89c6b165096933 Jens Axboe 2018-10-15 709
89c6b165096933 Jens Axboe 2018-10-15 710 spin_lock_irq(&pcd_lock);
89c6b165096933 Jens Axboe 2018-10-15 711 list_add_tail(&bd->rq->queuelist, &cd->rq_list);
547b50a1fbc176 Omar Sandoval 2017-03-27 712 pcd_request();
89c6b165096933 Jens Axboe 2018-10-15 713 spin_unlock_irq(&pcd_lock);
89c6b165096933 Jens Axboe 2018-10-15 714
89c6b165096933 Jens Axboe 2018-10-15 715 return BLK_STS_OK;
547b50a1fbc176 Omar Sandoval 2017-03-27 716 }
547b50a1fbc176 Omar Sandoval 2017-03-27 717
2a842acab109f4 Christoph Hellwig 2017-06-03 718 static inline void next_request(blk_status_t err)
^1da177e4c3f41 Linus Torvalds 2005-04-16 719 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 720 unsigned long saved_flags;
^1da177e4c3f41 Linus Torvalds 2005-04-16 721
^1da177e4c3f41 Linus Torvalds 2005-04-16 722 spin_lock_irqsave(&pcd_lock, saved_flags);
89c6b165096933 Jens Axboe 2018-10-15 723 if (!blk_update_request(pcd_req, err, blk_rq_cur_bytes(pcd_req))) {
89c6b165096933 Jens Axboe 2018-10-15 724 __blk_mq_end_request(pcd_req, err);
b12d4f82c1a3cd Tejun Heo 2009-05-08 725 pcd_req = NULL;
89c6b165096933 Jens Axboe 2018-10-15 726 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 727 pcd_busy = 0;
547b50a1fbc176 Omar Sandoval 2017-03-27 728 pcd_request();
^1da177e4c3f41 Linus Torvalds 2005-04-16 729 spin_unlock_irqrestore(&pcd_lock, saved_flags);
^1da177e4c3f41 Linus Torvalds 2005-04-16 730 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 731
^1da177e4c3f41 Linus Torvalds 2005-04-16 732 static int pcd_ready(void)
^1da177e4c3f41 Linus Torvalds 2005-04-16 733 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 734 return (((status_reg(pcd_current) & (IDE_BUSY | IDE_DRQ)) == IDE_DRQ));
^1da177e4c3f41 Linus Torvalds 2005-04-16 735 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 736
^1da177e4c3f41 Linus Torvalds 2005-04-16 737 static void pcd_transfer(void)
^1da177e4c3f41 Linus Torvalds 2005-04-16 738 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 739
^1da177e4c3f41 Linus Torvalds 2005-04-16 740 while (pcd_count && (pcd_sector / 4 == pcd_bufblk)) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 741 int o = (pcd_sector % 4) * 512;
^1da177e4c3f41 Linus Torvalds 2005-04-16 742 memcpy(pcd_buf, pcd_buffer + o, 512);
^1da177e4c3f41 Linus Torvalds 2005-04-16 743 pcd_count--;
^1da177e4c3f41 Linus Torvalds 2005-04-16 744 pcd_buf += 512;
^1da177e4c3f41 Linus Torvalds 2005-04-16 745 pcd_sector++;
^1da177e4c3f41 Linus Torvalds 2005-04-16 746 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 747 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 748
^1da177e4c3f41 Linus Torvalds 2005-04-16 749 static void pcd_start(void)
^1da177e4c3f41 Linus Torvalds 2005-04-16 750 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 751 int b, i;
^1da177e4c3f41 Linus Torvalds 2005-04-16 752 char rd_cmd[12] = { 0xa8, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 };
^1da177e4c3f41 Linus Torvalds 2005-04-16 753
^1da177e4c3f41 Linus Torvalds 2005-04-16 754 pcd_bufblk = pcd_sector / 4;
^1da177e4c3f41 Linus Torvalds 2005-04-16 755 b = pcd_bufblk;
^1da177e4c3f41 Linus Torvalds 2005-04-16 756 for (i = 0; i < 4; i++) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 757 rd_cmd[5 - i] = b & 0xff;
^1da177e4c3f41 Linus Torvalds 2005-04-16 758 b = b >> 8;
^1da177e4c3f41 Linus Torvalds 2005-04-16 759 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 760
^1da177e4c3f41 Linus Torvalds 2005-04-16 761 if (pcd_command(pcd_current, rd_cmd, 2048, "read block")) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 762 pcd_bufblk = -1;
2a842acab109f4 Christoph Hellwig 2017-06-03 763 next_request(BLK_STS_IOERR);
^1da177e4c3f41 Linus Torvalds 2005-04-16 764 return;
^1da177e4c3f41 Linus Torvalds 2005-04-16 765 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 766
^1da177e4c3f41 Linus Torvalds 2005-04-16 767 mdelay(1);
^1da177e4c3f41 Linus Torvalds 2005-04-16 768
^1da177e4c3f41 Linus Torvalds 2005-04-16 769 ps_set_intr(do_pcd_read_drq, pcd_ready, PCD_TMO, nice);
^1da177e4c3f41 Linus Torvalds 2005-04-16 770 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 771
^1da177e4c3f41 Linus Torvalds 2005-04-16 772 static void do_pcd_read(void)
^1da177e4c3f41 Linus Torvalds 2005-04-16 773 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 774 pcd_busy = 1;
^1da177e4c3f41 Linus Torvalds 2005-04-16 775 pcd_retries = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 776 pcd_transfer();
^1da177e4c3f41 Linus Torvalds 2005-04-16 777 if (!pcd_count) {
f06d9a2b52e246 Tejun Heo 2009-04-23 778 next_request(0);
^1da177e4c3f41 Linus Torvalds 2005-04-16 779 return;
^1da177e4c3f41 Linus Torvalds 2005-04-16 780 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 781
^1da177e4c3f41 Linus Torvalds 2005-04-16 782 pi_do_claimed(pcd_current->pi, pcd_start);
^1da177e4c3f41 Linus Torvalds 2005-04-16 783 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 784
^1da177e4c3f41 Linus Torvalds 2005-04-16 785 static void do_pcd_read_drq(void)
^1da177e4c3f41 Linus Torvalds 2005-04-16 786 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 787 unsigned long saved_flags;
^1da177e4c3f41 Linus Torvalds 2005-04-16 788
^1da177e4c3f41 Linus Torvalds 2005-04-16 789 if (pcd_completion(pcd_current, pcd_buffer, "read block")) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 790 if (pcd_retries < PCD_RETRIES) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 791 mdelay(1);
^1da177e4c3f41 Linus Torvalds 2005-04-16 792 pcd_retries++;
^1da177e4c3f41 Linus Torvalds 2005-04-16 793 pi_do_claimed(pcd_current->pi, pcd_start);
^1da177e4c3f41 Linus Torvalds 2005-04-16 794 return;
^1da177e4c3f41 Linus Torvalds 2005-04-16 795 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 796 pcd_bufblk = -1;
2a842acab109f4 Christoph Hellwig 2017-06-03 797 next_request(BLK_STS_IOERR);
^1da177e4c3f41 Linus Torvalds 2005-04-16 798 return;
^1da177e4c3f41 Linus Torvalds 2005-04-16 799 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 800
^1da177e4c3f41 Linus Torvalds 2005-04-16 801 do_pcd_read();
^1da177e4c3f41 Linus Torvalds 2005-04-16 802 spin_lock_irqsave(&pcd_lock, saved_flags);
547b50a1fbc176 Omar Sandoval 2017-03-27 803 pcd_request();
^1da177e4c3f41 Linus Torvalds 2005-04-16 804 spin_unlock_irqrestore(&pcd_lock, saved_flags);
^1da177e4c3f41 Linus Torvalds 2005-04-16 805 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 806
^1da177e4c3f41 Linus Torvalds 2005-04-16 807 /* the audio_ioctl stuff is adapted from sr_ioctl.c */
^1da177e4c3f41 Linus Torvalds 2005-04-16 808
^1da177e4c3f41 Linus Torvalds 2005-04-16 809 static int pcd_audio_ioctl(struct cdrom_device_info *cdi, unsigned int cmd, void *arg)
^1da177e4c3f41 Linus Torvalds 2005-04-16 810 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 811 struct pcd_unit *cd = cdi->handle;
^1da177e4c3f41 Linus Torvalds 2005-04-16 812
^1da177e4c3f41 Linus Torvalds 2005-04-16 813 switch (cmd) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 814
^1da177e4c3f41 Linus Torvalds 2005-04-16 815 case CDROMREADTOCHDR:
^1da177e4c3f41 Linus Torvalds 2005-04-16 816
^1da177e4c3f41 Linus Torvalds 2005-04-16 817 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 818 char cmd[12] =
^1da177e4c3f41 Linus Torvalds 2005-04-16 819 { GPCMD_READ_TOC_PMA_ATIP, 0, 0, 0, 0, 0, 0, 0, 12,
^1da177e4c3f41 Linus Torvalds 2005-04-16 820 0, 0, 0 };
^1da177e4c3f41 Linus Torvalds 2005-04-16 821 struct cdrom_tochdr *tochdr =
^1da177e4c3f41 Linus Torvalds 2005-04-16 822 (struct cdrom_tochdr *) arg;
^1da177e4c3f41 Linus Torvalds 2005-04-16 823 char buffer[32];
^1da177e4c3f41 Linus Torvalds 2005-04-16 824 int r;
^1da177e4c3f41 Linus Torvalds 2005-04-16 825
^1da177e4c3f41 Linus Torvalds 2005-04-16 826 r = pcd_atapi(cd, cmd, 12, buffer, "read toc header");
^1da177e4c3f41 Linus Torvalds 2005-04-16 827
^1da177e4c3f41 Linus Torvalds 2005-04-16 828 tochdr->cdth_trk0 = buffer[2];
^1da177e4c3f41 Linus Torvalds 2005-04-16 829 tochdr->cdth_trk1 = buffer[3];
^1da177e4c3f41 Linus Torvalds 2005-04-16 830
^1da177e4c3f41 Linus Torvalds 2005-04-16 831 return r ? -EIO : 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 832 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 833
^1da177e4c3f41 Linus Torvalds 2005-04-16 834 case CDROMREADTOCENTRY:
^1da177e4c3f41 Linus Torvalds 2005-04-16 835
^1da177e4c3f41 Linus Torvalds 2005-04-16 836 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 837 char cmd[12] =
^1da177e4c3f41 Linus Torvalds 2005-04-16 838 { GPCMD_READ_TOC_PMA_ATIP, 0, 0, 0, 0, 0, 0, 0, 12,
^1da177e4c3f41 Linus Torvalds 2005-04-16 839 0, 0, 0 };
^1da177e4c3f41 Linus Torvalds 2005-04-16 840
^1da177e4c3f41 Linus Torvalds 2005-04-16 841 struct cdrom_tocentry *tocentry =
^1da177e4c3f41 Linus Torvalds 2005-04-16 842 (struct cdrom_tocentry *) arg;
^1da177e4c3f41 Linus Torvalds 2005-04-16 843 unsigned char buffer[32];
^1da177e4c3f41 Linus Torvalds 2005-04-16 844 int r;
^1da177e4c3f41 Linus Torvalds 2005-04-16 845
^1da177e4c3f41 Linus Torvalds 2005-04-16 846 cmd[1] =
^1da177e4c3f41 Linus Torvalds 2005-04-16 847 (tocentry->cdte_format == CDROM_MSF ? 0x02 : 0);
^1da177e4c3f41 Linus Torvalds 2005-04-16 848 cmd[6] = tocentry->cdte_track;
^1da177e4c3f41 Linus Torvalds 2005-04-16 849
^1da177e4c3f41 Linus Torvalds 2005-04-16 850 r = pcd_atapi(cd, cmd, 12, buffer, "read toc entry");
^1da177e4c3f41 Linus Torvalds 2005-04-16 851
^1da177e4c3f41 Linus Torvalds 2005-04-16 852 tocentry->cdte_ctrl = buffer[5] & 0xf;
^1da177e4c3f41 Linus Torvalds 2005-04-16 853 tocentry->cdte_adr = buffer[5] >> 4;
^1da177e4c3f41 Linus Torvalds 2005-04-16 854 tocentry->cdte_datamode =
^1da177e4c3f41 Linus Torvalds 2005-04-16 855 (tocentry->cdte_ctrl & 0x04) ? 1 : 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 856 if (tocentry->cdte_format == CDROM_MSF) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 857 tocentry->cdte_addr.msf.minute = buffer[9];
^1da177e4c3f41 Linus Torvalds 2005-04-16 858 tocentry->cdte_addr.msf.second = buffer[10];
^1da177e4c3f41 Linus Torvalds 2005-04-16 859 tocentry->cdte_addr.msf.frame = buffer[11];
^1da177e4c3f41 Linus Torvalds 2005-04-16 860 } else
^1da177e4c3f41 Linus Torvalds 2005-04-16 861 tocentry->cdte_addr.lba =
^1da177e4c3f41 Linus Torvalds 2005-04-16 862 (((((buffer[8] << 8) + buffer[9]) << 8)
^1da177e4c3f41 Linus Torvalds 2005-04-16 863 + buffer[10]) << 8) + buffer[11];
^1da177e4c3f41 Linus Torvalds 2005-04-16 864
^1da177e4c3f41 Linus Torvalds 2005-04-16 865 return r ? -EIO : 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 866 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 867
^1da177e4c3f41 Linus Torvalds 2005-04-16 868 default:
^1da177e4c3f41 Linus Torvalds 2005-04-16 869
^1da177e4c3f41 Linus Torvalds 2005-04-16 870 return -ENOSYS;
^1da177e4c3f41 Linus Torvalds 2005-04-16 871 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 872 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 873
^1da177e4c3f41 Linus Torvalds 2005-04-16 874 static int pcd_get_mcn(struct cdrom_device_info *cdi, struct cdrom_mcn *mcn)
^1da177e4c3f41 Linus Torvalds 2005-04-16 875 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 876 char cmd[12] =
^1da177e4c3f41 Linus Torvalds 2005-04-16 877 { GPCMD_READ_SUBCHANNEL, 0, 0x40, 2, 0, 0, 0, 0, 24, 0, 0, 0 };
^1da177e4c3f41 Linus Torvalds 2005-04-16 878 char buffer[32];
^1da177e4c3f41 Linus Torvalds 2005-04-16 879
^1da177e4c3f41 Linus Torvalds 2005-04-16 880 if (pcd_atapi(cdi->handle, cmd, 24, buffer, "get mcn"))
^1da177e4c3f41 Linus Torvalds 2005-04-16 881 return -EIO;
^1da177e4c3f41 Linus Torvalds 2005-04-16 882
^1da177e4c3f41 Linus Torvalds 2005-04-16 883 memcpy(mcn->medium_catalog_number, buffer + 9, 13);
^1da177e4c3f41 Linus Torvalds 2005-04-16 884 mcn->medium_catalog_number[13] = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 885
^1da177e4c3f41 Linus Torvalds 2005-04-16 886 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 887 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 888
af761f277b7fd8 Christoph Hellwig 2021-09-27 889 static int pcd_init_unit(struct pcd_unit *cd, bool autoprobe, int port,
af761f277b7fd8 Christoph Hellwig 2021-09-27 890 int mode, int unit, int protocol, int delay, int ms)
^1da177e4c3f41 Linus Torvalds 2005-04-16 891 {
af761f277b7fd8 Christoph Hellwig 2021-09-27 892 struct gendisk *disk;
af761f277b7fd8 Christoph Hellwig 2021-09-27 893 int ret;
^1da177e4c3f41 Linus Torvalds 2005-04-16 894
af761f277b7fd8 Christoph Hellwig 2021-09-27 @895 ret = blk_mq_alloc_sq_tag_set(&cd->tag_set, &pcd_mq_ops, 1,
af761f277b7fd8 Christoph Hellwig 2021-09-27 896 BLK_MQ_F_SHOULD_MERGE);
af761f277b7fd8 Christoph Hellwig 2021-09-27 897 if (ret)
af761f277b7fd8 Christoph Hellwig 2021-09-27 898 return ret;
^1da177e4c3f41 Linus Torvalds 2005-04-16 899
af761f277b7fd8 Christoph Hellwig 2021-09-27 900 disk = blk_mq_alloc_disk(&cd->tag_set, cd);
af761f277b7fd8 Christoph Hellwig 2021-09-27 901 if (IS_ERR(disk)) {
af761f277b7fd8 Christoph Hellwig 2021-09-27 902 ret = PTR_ERR(disk);
af761f277b7fd8 Christoph Hellwig 2021-09-27 903 goto out_free_tag_set;
af761f277b7fd8 Christoph Hellwig 2021-09-27 904 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 905
af761f277b7fd8 Christoph Hellwig 2021-09-27 906 INIT_LIST_HEAD(&cd->rq_list);
af761f277b7fd8 Christoph Hellwig 2021-09-27 907 blk_queue_bounce_limit(disk->queue, BLK_BOUNCE_HIGH);
af761f277b7fd8 Christoph Hellwig 2021-09-27 908 cd->disk = disk;
af761f277b7fd8 Christoph Hellwig 2021-09-27 909 cd->pi = &cd->pia;
af761f277b7fd8 Christoph Hellwig 2021-09-27 910 cd->present = 0;
af761f277b7fd8 Christoph Hellwig 2021-09-27 911 cd->last_sense = 0;
af761f277b7fd8 Christoph Hellwig 2021-09-27 912 cd->changed = 1;
af761f277b7fd8 Christoph Hellwig 2021-09-27 913 cd->drive = (*drives[cd - pcd])[D_SLV];
^1da177e4c3f41 Linus Torvalds 2005-04-16 914
af761f277b7fd8 Christoph Hellwig 2021-09-27 915 cd->name = &cd->info.name[0];
af761f277b7fd8 Christoph Hellwig 2021-09-27 916 snprintf(cd->name, sizeof(cd->info.name), "%s%d", name, unit);
af761f277b7fd8 Christoph Hellwig 2021-09-27 917 cd->info.ops = &pcd_dops;
af761f277b7fd8 Christoph Hellwig 2021-09-27 918 cd->info.handle = cd;
af761f277b7fd8 Christoph Hellwig 2021-09-27 919 cd->info.speed = 0;
af761f277b7fd8 Christoph Hellwig 2021-09-27 920 cd->info.capacity = 1;
af761f277b7fd8 Christoph Hellwig 2021-09-27 921 cd->info.mask = 0;
af761f277b7fd8 Christoph Hellwig 2021-09-27 922 disk->major = major;
af761f277b7fd8 Christoph Hellwig 2021-09-27 923 disk->first_minor = unit;
af761f277b7fd8 Christoph Hellwig 2021-09-27 924 disk->minors = 1;
af761f277b7fd8 Christoph Hellwig 2021-09-27 925 strcpy(disk->disk_name, cd->name); /* umm... */
af761f277b7fd8 Christoph Hellwig 2021-09-27 926 disk->fops = &pcd_bdops;
03b9d5d4dfb355 Christoph Hellwig 2021-11-10 927 disk->flags |= GENHD_FL_NO_PART;
af761f277b7fd8 Christoph Hellwig 2021-09-27 928 disk->events = DISK_EVENT_MEDIA_CHANGE;
ded3720c03217f Christoph Hellwig 2021-11-10 929 disk->event_flags = DISK_EVENT_FLAG_BLOCK_ON_EXCL_WRITE;
^1da177e4c3f41 Linus Torvalds 2005-04-16 930
af761f277b7fd8 Christoph Hellwig 2021-09-27 931 if (!pi_init(cd->pi, autoprobe, port, mode, unit, protocol, delay,
d0ac7a30e41174 Dan Carpenter 2021-10-01 932 pcd_buffer, PI_PCD, verbose, cd->name)) {
d0ac7a30e41174 Dan Carpenter 2021-10-01 933 ret = -ENODEV;
af761f277b7fd8 Christoph Hellwig 2021-09-27 934 goto out_free_disk;
d0ac7a30e41174 Dan Carpenter 2021-10-01 935 }
d0ac7a30e41174 Dan Carpenter 2021-10-01 936 ret = pcd_probe(cd, ms);
d0ac7a30e41174 Dan Carpenter 2021-10-01 937 if (ret)
af761f277b7fd8 Christoph Hellwig 2021-09-27 938 goto out_pi_release;
f0d1762554014c YueHaibing 2019-04-05 939
af761f277b7fd8 Christoph Hellwig 2021-09-27 940 cd->present = 1;
af761f277b7fd8 Christoph Hellwig 2021-09-27 941 pcd_probe_capabilities(cd);
b6fa069971bc42 Luis Chamberlain 2021-09-27 942 ret = register_cdrom(cd->disk, &cd->info);
b6fa069971bc42 Luis Chamberlain 2021-09-27 943 if (ret)
b6fa069971bc42 Luis Chamberlain 2021-09-27 944 goto out_pi_release;
4dfbd1390af607 Luis Chamberlain 2021-09-27 945 ret = add_disk(cd->disk);
4dfbd1390af607 Luis Chamberlain 2021-09-27 946 if (ret)
4dfbd1390af607 Luis Chamberlain 2021-09-27 947 goto out_unreg_cdrom;
af761f277b7fd8 Christoph Hellwig 2021-09-27 948 return 0;
af761f277b7fd8 Christoph Hellwig 2021-09-27 949
4dfbd1390af607 Luis Chamberlain 2021-09-27 950 out_unreg_cdrom:
4dfbd1390af607 Luis Chamberlain 2021-09-27 951 unregister_cdrom(&cd->info);
af761f277b7fd8 Christoph Hellwig 2021-09-27 952 out_pi_release:
af761f277b7fd8 Christoph Hellwig 2021-09-27 953 pi_release(cd->pi);
af761f277b7fd8 Christoph Hellwig 2021-09-27 954 out_free_disk:
af761f277b7fd8 Christoph Hellwig 2021-09-27 955 blk_cleanup_disk(cd->disk);
af761f277b7fd8 Christoph Hellwig 2021-09-27 956 out_free_tag_set:
f0d1762554014c YueHaibing 2019-04-05 957 blk_mq_free_tag_set(&cd->tag_set);
af761f277b7fd8 Christoph Hellwig 2021-09-27 958 return ret;
f0d1762554014c YueHaibing 2019-04-05 959 }
af761f277b7fd8 Christoph Hellwig 2021-09-27 960
:::::: The code at line 895 was first introduced by commit
:::::: af761f277b7fd896c27cb1100b25f11567987822 pcd: cleanup initialization
:::::: TO: Christoph Hellwig <hch(a)lst.de>
:::::: CC: Jens Axboe <axboe(a)kernel.dk>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[axboe-block:block-5.16 5/5] block/blk-ia-ranges.c:119: warning: expecting prototype for disk_register_independent_access__ranges(). Prototype was for disk_register_independent_access_ranges() instead
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git block-5.16
head: 68636e242d45453d48a7d30a18a49f80d4ae08c0
commit: 68636e242d45453d48a7d30a18a49f80d4ae08c0 [5/5] block: fix kerneldoc for disk_register_independent_access__ranges()
config: ia64-defconfig (attached as .config)
compiler: ia64-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://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/com...
git remote add axboe-block https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
git fetch --no-tags axboe-block block-5.16
git checkout 68636e242d45453d48a7d30a18a49f80d4ae08c0
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=ia64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> block/blk-ia-ranges.c:119: warning: expecting prototype for disk_register_independent_access__ranges(). Prototype was for disk_register_independent_access_ranges() instead
vim +119 block/blk-ia-ranges.c
a2247f19ee1c5a Damien Le Moal 2021-10-27 105
a2247f19ee1c5a Damien Le Moal 2021-10-27 106 /**
68636e242d4545 Jens Axboe 2021-11-10 107 * disk_register_independent_access__ranges - register with sysfs a set of
68636e242d4545 Jens Axboe 2021-11-10 108 * independent access ranges
a2247f19ee1c5a Damien Le Moal 2021-10-27 109 * @disk: Target disk
a2247f19ee1c5a Damien Le Moal 2021-10-27 110 * @new_iars: New set of independent access ranges
a2247f19ee1c5a Damien Le Moal 2021-10-27 111 *
a2247f19ee1c5a Damien Le Moal 2021-10-27 112 * Register with sysfs a set of independent access ranges for @disk.
a2247f19ee1c5a Damien Le Moal 2021-10-27 113 * If @new_iars is not NULL, this set of ranges is registered and the old set
a2247f19ee1c5a Damien Le Moal 2021-10-27 114 * specified by q->ia_ranges is unregistered. Otherwise, q->ia_ranges is
a2247f19ee1c5a Damien Le Moal 2021-10-27 115 * registered if it is not already.
a2247f19ee1c5a Damien Le Moal 2021-10-27 116 */
a2247f19ee1c5a Damien Le Moal 2021-10-27 117 int disk_register_independent_access_ranges(struct gendisk *disk,
a2247f19ee1c5a Damien Le Moal 2021-10-27 118 struct blk_independent_access_ranges *new_iars)
a2247f19ee1c5a Damien Le Moal 2021-10-27 @119 {
a2247f19ee1c5a Damien Le Moal 2021-10-27 120 struct request_queue *q = disk->queue;
a2247f19ee1c5a Damien Le Moal 2021-10-27 121 struct blk_independent_access_ranges *iars;
a2247f19ee1c5a Damien Le Moal 2021-10-27 122 int i, ret;
a2247f19ee1c5a Damien Le Moal 2021-10-27 123
a2247f19ee1c5a Damien Le Moal 2021-10-27 124 lockdep_assert_held(&q->sysfs_dir_lock);
a2247f19ee1c5a Damien Le Moal 2021-10-27 125 lockdep_assert_held(&q->sysfs_lock);
a2247f19ee1c5a Damien Le Moal 2021-10-27 126
a2247f19ee1c5a Damien Le Moal 2021-10-27 127 /* If a new range set is specified, unregister the old one */
a2247f19ee1c5a Damien Le Moal 2021-10-27 128 if (new_iars) {
a2247f19ee1c5a Damien Le Moal 2021-10-27 129 if (q->ia_ranges)
a2247f19ee1c5a Damien Le Moal 2021-10-27 130 disk_unregister_independent_access_ranges(disk);
a2247f19ee1c5a Damien Le Moal 2021-10-27 131 q->ia_ranges = new_iars;
a2247f19ee1c5a Damien Le Moal 2021-10-27 132 }
a2247f19ee1c5a Damien Le Moal 2021-10-27 133
a2247f19ee1c5a Damien Le Moal 2021-10-27 134 iars = q->ia_ranges;
a2247f19ee1c5a Damien Le Moal 2021-10-27 135 if (!iars)
a2247f19ee1c5a Damien Le Moal 2021-10-27 136 return 0;
a2247f19ee1c5a Damien Le Moal 2021-10-27 137
a2247f19ee1c5a Damien Le Moal 2021-10-27 138 /*
a2247f19ee1c5a Damien Le Moal 2021-10-27 139 * At this point, iars is the new set of sector access ranges that needs
a2247f19ee1c5a Damien Le Moal 2021-10-27 140 * to be registered with sysfs.
a2247f19ee1c5a Damien Le Moal 2021-10-27 141 */
a2247f19ee1c5a Damien Le Moal 2021-10-27 142 WARN_ON(iars->sysfs_registered);
a2247f19ee1c5a Damien Le Moal 2021-10-27 143 ret = kobject_init_and_add(&iars->kobj, &blk_ia_ranges_ktype,
a2247f19ee1c5a Damien Le Moal 2021-10-27 144 &q->kobj, "%s", "independent_access_ranges");
a2247f19ee1c5a Damien Le Moal 2021-10-27 145 if (ret) {
a2247f19ee1c5a Damien Le Moal 2021-10-27 146 q->ia_ranges = NULL;
a2247f19ee1c5a Damien Le Moal 2021-10-27 147 kfree(iars);
a2247f19ee1c5a Damien Le Moal 2021-10-27 148 return ret;
a2247f19ee1c5a Damien Le Moal 2021-10-27 149 }
a2247f19ee1c5a Damien Le Moal 2021-10-27 150
a2247f19ee1c5a Damien Le Moal 2021-10-27 151 for (i = 0; i < iars->nr_ia_ranges; i++) {
a2247f19ee1c5a Damien Le Moal 2021-10-27 152 iars->ia_range[i].queue = q;
a2247f19ee1c5a Damien Le Moal 2021-10-27 153 ret = kobject_init_and_add(&iars->ia_range[i].kobj,
a2247f19ee1c5a Damien Le Moal 2021-10-27 154 &blk_ia_range_ktype, &iars->kobj,
a2247f19ee1c5a Damien Le Moal 2021-10-27 155 "%d", i);
a2247f19ee1c5a Damien Le Moal 2021-10-27 156 if (ret) {
a2247f19ee1c5a Damien Le Moal 2021-10-27 157 while (--i >= 0)
a2247f19ee1c5a Damien Le Moal 2021-10-27 158 kobject_del(&iars->ia_range[i].kobj);
a2247f19ee1c5a Damien Le Moal 2021-10-27 159 kobject_del(&iars->kobj);
a2247f19ee1c5a Damien Le Moal 2021-10-27 160 kobject_put(&iars->kobj);
a2247f19ee1c5a Damien Le Moal 2021-10-27 161 return ret;
a2247f19ee1c5a Damien Le Moal 2021-10-27 162 }
a2247f19ee1c5a Damien Le Moal 2021-10-27 163 }
a2247f19ee1c5a Damien Le Moal 2021-10-27 164
a2247f19ee1c5a Damien Le Moal 2021-10-27 165 iars->sysfs_registered = true;
a2247f19ee1c5a Damien Le Moal 2021-10-27 166
a2247f19ee1c5a Damien Le Moal 2021-10-27 167 return 0;
a2247f19ee1c5a Damien Le Moal 2021-10-27 168 }
a2247f19ee1c5a Damien Le Moal 2021-10-27 169
:::::: The code at line 119 was first introduced by commit
:::::: a2247f19ee1c5ad75ef095cdfb909a3244b88aa8 block: Add independent access ranges support
:::::: TO: Damien Le Moal <damien.lemoal(a)wdc.com>
:::::: CC: Jens Axboe <axboe(a)kernel.dk>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
Re: [PATCH v3 06/15] mm: introduce refcount for user PTE page table page
by kernel test robot
Hi Qi,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on hnaz-mm/master]
[also build test ERROR on linus/master next-20211110]
[cannot apply to tip/perf/core tip/x86/core v5.15]
[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/Qi-Zheng/Free-user-PTE-page-tabl...
base: https://github.com/hnaz/linux-mm master
config: mips-allyesconfig (attached as .config)
compiler: mips-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/e03404013f81d7b11aa6f5c3fef381632...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Qi-Zheng/Free-user-PTE-page-table-pages/20211110-185837
git checkout e03404013f81d7b11aa6f5c3fef3816320b2baf0
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=mips prepare
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
error: no override and no default toolchain set
init/Kconfig:70:warning: 'RUSTC_VERSION': number is invalid
In file included from include/linux/mmzone.h:21,
from include/linux/gfp.h:6,
from include/linux/radix-tree.h:12,
from include/linux/fs.h:15,
from include/linux/compat.h:17,
from arch/mips/kernel/asm-offsets.c:12:
>> include/linux/mm_types.h:154:33: error: unknown type name 'pmd_t'
154 | pmd_t *pmd; /* PTE page only */
| ^~~~~
In file included from include/asm-generic/div64.h:27,
from arch/mips/include/asm/div64.h:89,
from include/linux/math.h:5,
from include/linux/math64.h:6,
from include/linux/time.h:6,
from include/linux/compat.h:10,
from arch/mips/kernel/asm-offsets.c:12:
include/linux/mm.h: In function 'pte_alloc':
include/linux/mm.h:2318:22: error: implicit declaration of function 'is_huge_pmd'; did you mean 'zap_huge_pmd'? [-Werror=implicit-function-declaration]
2318 | if (unlikely(is_huge_pmd(*pmd)))
| ^~~~~~~~~~~
include/linux/compiler.h:78:45: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
arch/mips/kernel/asm-offsets.c: At top level:
arch/mips/kernel/asm-offsets.c:26:6: error: no previous prototype for 'output_ptreg_defines' [-Werror=missing-prototypes]
26 | void output_ptreg_defines(void)
| ^~~~~~~~~~~~~~~~~~~~
arch/mips/kernel/asm-offsets.c:78:6: error: no previous prototype for 'output_task_defines' [-Werror=missing-prototypes]
78 | void output_task_defines(void)
| ^~~~~~~~~~~~~~~~~~~
arch/mips/kernel/asm-offsets.c:92:6: error: no previous prototype for 'output_thread_info_defines' [-Werror=missing-prototypes]
92 | void output_thread_info_defines(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
arch/mips/kernel/asm-offsets.c:108:6: error: no previous prototype for 'output_thread_defines' [-Werror=missing-prototypes]
108 | void output_thread_defines(void)
| ^~~~~~~~~~~~~~~~~~~~~
arch/mips/kernel/asm-offsets.c:136:6: error: no previous prototype for 'output_thread_fpu_defines' [-Werror=missing-prototypes]
136 | void output_thread_fpu_defines(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
arch/mips/kernel/asm-offsets.c:179:6: error: no previous prototype for 'output_mm_defines' [-Werror=missing-prototypes]
179 | void output_mm_defines(void)
| ^~~~~~~~~~~~~~~~~
arch/mips/kernel/asm-offsets.c:218:6: error: no previous prototype for 'output_sc_defines' [-Werror=missing-prototypes]
218 | void output_sc_defines(void)
| ^~~~~~~~~~~~~~~~~
arch/mips/kernel/asm-offsets.c:253:6: error: no previous prototype for 'output_signal_defined' [-Werror=missing-prototypes]
253 | void output_signal_defined(void)
| ^~~~~~~~~~~~~~~~~~~~~
arch/mips/kernel/asm-offsets.c:320:6: error: no previous prototype for 'output_pbe_defines' [-Werror=missing-prototypes]
320 | void output_pbe_defines(void)
| ^~~~~~~~~~~~~~~~~~
arch/mips/kernel/asm-offsets.c:332:6: error: no previous prototype for 'output_pm_defines' [-Werror=missing-prototypes]
332 | void output_pm_defines(void)
| ^~~~~~~~~~~~~~~~~
arch/mips/kernel/asm-offsets.c:346:6: error: no previous prototype for 'output_kvm_defines' [-Werror=missing-prototypes]
346 | void output_kvm_defines(void)
| ^~~~~~~~~~~~~~~~~~
arch/mips/kernel/asm-offsets.c:390:6: error: no previous prototype for 'output_cps_defines' [-Werror=missing-prototypes]
390 | void output_cps_defines(void)
| ^~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [scripts/Makefile.build:122: arch/mips/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1288: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:226: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +/pmd_t +154 include/linux/mm_types.h
70
71 struct page {
72 unsigned long flags; /* Atomic flags, some possibly
73 * updated asynchronously */
74 /*
75 * Five words (20/40 bytes) are available in this union.
76 * WARNING: bit 0 of the first word is used for PageTail(). That
77 * means the other users of this union MUST NOT use the bit to
78 * avoid collision and false-positive PageTail().
79 */
80 union {
81 struct { /* Page cache and anonymous pages */
82 /**
83 * @lru: Pageout list, eg. active_list protected by
84 * lruvec->lru_lock. Sometimes used as a generic list
85 * by the page owner.
86 */
87 struct list_head lru;
88 /* See page-flags.h for PAGE_MAPPING_FLAGS */
89 struct address_space *mapping;
90 pgoff_t index; /* Our offset within mapping. */
91 /**
92 * @private: Mapping-private opaque data.
93 * Usually used for buffer_heads if PagePrivate.
94 * Used for swp_entry_t if PageSwapCache.
95 * Indicates order in the buddy system if PageBuddy.
96 */
97 unsigned long private;
98 };
99 struct { /* page_pool used by netstack */
100 /**
101 * @pp_magic: magic value to avoid recycling non
102 * page_pool allocated pages.
103 */
104 unsigned long pp_magic;
105 struct page_pool *pp;
106 unsigned long _pp_mapping_pad;
107 unsigned long dma_addr;
108 atomic_long_t pp_frag_count;
109 };
110 struct { /* slab, slob and slub */
111 union {
112 struct list_head slab_list;
113 struct { /* Partial pages */
114 struct page *next;
115 #ifdef CONFIG_64BIT
116 int pages; /* Nr of pages left */
117 #else
118 short int pages;
119 #endif
120 };
121 };
122 struct kmem_cache *slab_cache; /* not slob */
123 /* Double-word boundary */
124 void *freelist; /* first free object */
125 union {
126 void *s_mem; /* slab: first object */
127 unsigned long counters; /* SLUB */
128 struct { /* SLUB */
129 unsigned inuse:16;
130 unsigned objects:15;
131 unsigned frozen:1;
132 };
133 };
134 };
135 struct { /* Tail pages of compound page */
136 unsigned long compound_head; /* Bit zero is set */
137
138 /* First tail page only */
139 unsigned char compound_dtor;
140 unsigned char compound_order;
141 atomic_t compound_mapcount;
142 unsigned int compound_nr; /* 1 << compound_order */
143 };
144 struct { /* Second tail page of compound page */
145 unsigned long _compound_pad_1; /* compound_head */
146 atomic_t hpage_pinned_refcount;
147 /* For both global and memcg */
148 struct list_head deferred_list;
149 };
150 struct { /* Page table pages */
151 unsigned long _pt_pad_1; /* compound_head */
152 union {
153 pgtable_t pmd_huge_pte; /* protected by page->ptl */
> 154 pmd_t *pmd; /* PTE page only */
155 };
156 unsigned long _pt_pad_2; /* mapping */
157 union {
158 struct mm_struct *pt_mm; /* x86 pgds only */
159 atomic_t pt_frag_refcount; /* powerpc */
160 atomic_t pte_refcount; /* PTE page only */
161 };
162 #if ALLOC_SPLIT_PTLOCKS
163 spinlock_t *ptl;
164 #else
165 spinlock_t ptl;
166 #endif
167 };
168 struct { /* ZONE_DEVICE pages */
169 /** @pgmap: Points to the hosting device page map. */
170 struct dev_pagemap *pgmap;
171 void *zone_device_data;
172 /*
173 * ZONE_DEVICE private pages are counted as being
174 * mapped so the next 3 words hold the mapping, index,
175 * and private fields from the source anonymous or
176 * page cache page while the page is migrated to device
177 * private memory.
178 * ZONE_DEVICE MEMORY_DEVICE_FS_DAX pages also
179 * use the mapping, index, and private fields when
180 * pmem backed DAX files are mapped.
181 */
182 };
183
184 /** @rcu_head: You can use this to free a page by RCU. */
185 struct rcu_head rcu_head;
186 };
187
188 union { /* This union is 4 bytes in size. */
189 /*
190 * If the page can be mapped to userspace, encodes the number
191 * of times this page is referenced by a page table.
192 */
193 atomic_t _mapcount;
194
195 /*
196 * If the page is neither PageSlab nor mappable to userspace,
197 * the value stored here may help determine what this page
198 * is used for. See page-flags.h for a list of page types
199 * which are currently stored here.
200 */
201 unsigned int page_type;
202
203 unsigned int active; /* SLAB */
204 int units; /* SLOB */
205 };
206
207 /* Usage count. *DO NOT USE DIRECTLY*. See page_ref.h */
208 atomic_t _refcount;
209
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
block/blk-ia-ranges.c:119: warning: expecting prototype for disk_register_ia_ranges(). Prototype was for disk_register_independent_access_ranges() instead
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 881007522c8fcc3785c75432dbb149ca1b78e106
commit: a2247f19ee1c5ad75ef095cdfb909a3244b88aa8 block: Add independent access ranges support
date: 2 weeks ago
config: m68k-randconfig-r036-20211027 (attached as .config)
compiler: m68k-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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout a2247f19ee1c5ad75ef095cdfb909a3244b88aa8
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=m68k SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> block/blk-ia-ranges.c:119: warning: expecting prototype for disk_register_ia_ranges(). Prototype was for disk_register_independent_access_ranges() instead
vim +119 block/blk-ia-ranges.c
105
106 /**
107 * disk_register_ia_ranges - register with sysfs a set of independent
108 * access ranges
109 * @disk: Target disk
110 * @new_iars: New set of independent access ranges
111 *
112 * Register with sysfs a set of independent access ranges for @disk.
113 * If @new_iars is not NULL, this set of ranges is registered and the old set
114 * specified by q->ia_ranges is unregistered. Otherwise, q->ia_ranges is
115 * registered if it is not already.
116 */
117 int disk_register_independent_access_ranges(struct gendisk *disk,
118 struct blk_independent_access_ranges *new_iars)
> 119 {
120 struct request_queue *q = disk->queue;
121 struct blk_independent_access_ranges *iars;
122 int i, ret;
123
124 lockdep_assert_held(&q->sysfs_dir_lock);
125 lockdep_assert_held(&q->sysfs_lock);
126
127 /* If a new range set is specified, unregister the old one */
128 if (new_iars) {
129 if (q->ia_ranges)
130 disk_unregister_independent_access_ranges(disk);
131 q->ia_ranges = new_iars;
132 }
133
134 iars = q->ia_ranges;
135 if (!iars)
136 return 0;
137
138 /*
139 * At this point, iars is the new set of sector access ranges that needs
140 * to be registered with sysfs.
141 */
142 WARN_ON(iars->sysfs_registered);
143 ret = kobject_init_and_add(&iars->kobj, &blk_ia_ranges_ktype,
144 &q->kobj, "%s", "independent_access_ranges");
145 if (ret) {
146 q->ia_ranges = NULL;
147 kfree(iars);
148 return ret;
149 }
150
151 for (i = 0; i < iars->nr_ia_ranges; i++) {
152 iars->ia_range[i].queue = q;
153 ret = kobject_init_and_add(&iars->ia_range[i].kobj,
154 &blk_ia_range_ktype, &iars->kobj,
155 "%d", i);
156 if (ret) {
157 while (--i >= 0)
158 kobject_del(&iars->ia_range[i].kobj);
159 kobject_del(&iars->kobj);
160 kobject_put(&iars->kobj);
161 return ret;
162 }
163 }
164
165 iars->sysfs_registered = true;
166
167 return 0;
168 }
169
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[android-common:android12-5.10 1/1] kernel/cpu.c:1368:9: error: implicit declaration of function 'cpuset_update_active_cpus_affine'; did you mean 'cpuset_update_active_cpus'?
by kernel test robot
tree: https://android.googlesource.com/kernel/common android12-5.10
head: 09bd9e940e98acad0c854f75b31fc79a93cde981
commit: 09bd9e940e98acad0c854f75b31fc79a93cde981 [1/1] ANDROID: cpuhp/pause: schedule cpu_hotplug_work on resume cpu
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-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
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android12-5.10
git checkout 09bd9e940e98acad0c854f75b31fc79a93cde981
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Note: the android-common/android12-5.10 HEAD 45ebb9628e49418f30d182a8af06cff34a0a06e8 builds fine.
It only hurts bisectability.
All errors (new ones prefixed by >>):
kernel/cpu.c:1158:5: warning: no previous prototype for '__pause_drain_rq' [-Wmissing-prototypes]
1158 | int __pause_drain_rq(struct cpumask *cpus)
| ^~~~~~~~~~~~~~~~
kernel/cpu.c:1178:6: warning: no previous prototype for '__wait_drain_rq' [-Wmissing-prototypes]
1178 | void __wait_drain_rq(struct cpumask *cpus)
| ^~~~~~~~~~~~~~~
kernel/cpu.c: In function 'resume_cpus':
>> kernel/cpu.c:1368:9: error: implicit declaration of function 'cpuset_update_active_cpus_affine'; did you mean 'cpuset_update_active_cpus'? [-Werror=implicit-function-declaration]
1368 | cpuset_update_active_cpus_affine(cpumask_first(cpus));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| cpuset_update_active_cpus
cc1: some warnings being treated as errors
vim +1368 kernel/cpu.c
1325
1326 int resume_cpus(struct cpumask *cpus)
1327 {
1328 unsigned int cpu;
1329 int err = 0;
1330 u64 start_time = 0;
1331 int prev_prio;
1332
1333 start_time = sched_clock();
1334
1335 cpu_maps_update_begin();
1336
1337 if (cpu_hotplug_disabled) {
1338 err = -EBUSY;
1339 goto err_cpu_maps_update;
1340 }
1341
1342 /* Resuming an already active CPU isn't an error */
1343 cpumask_andnot(cpus, cpus, cpu_active_mask);
1344
1345 for_each_cpu(cpu, cpus) {
1346 if (!cpu_online(cpu)) {
1347 err = -EBUSY;
1348 goto err_cpu_maps_update;
1349 }
1350 }
1351
1352 if (cpumask_empty(cpus))
1353 goto err_cpu_maps_update;
1354
1355 for_each_cpu(cpu, cpus)
1356 set_cpu_active(cpu, true);
1357
1358 trace_android_rvh_resume_cpus(cpus, &err);
1359 if (err)
1360 goto err_cpu_maps_update;
1361
1362 prev_prio = pause_reduce_prio();
1363
1364 /* Lazy Resume. Build domains through schedule a workqueue on
1365 * resuming cpu. This is so that the resuming cpu can work more
1366 * early, and cannot add additional load to other busy cpu.
1367 */
> 1368 cpuset_update_active_cpus_affine(cpumask_first(cpus));
1369
1370 cpus_write_lock();
1371
1372 cpuhp_tasks_frozen = 0;
1373
1374 if (sched_cpus_activate(cpus)) {
1375 err = -EBUSY;
1376 goto err_cpus_write_unlock;
1377 }
1378
1379 /*
1380 * see pause_cpus.
1381 */
1382 for_each_cpu(cpu, cpus) {
1383 struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu);
1384
1385 st->state = CPUHP_ONLINE;
1386 st->target = st->state;
1387 }
1388
1389 err_cpus_write_unlock:
1390 cpus_write_unlock();
1391 pause_restore_prio(prev_prio);
1392 err_cpu_maps_update:
1393 cpu_maps_update_done();
1394
1395 trace_cpuhp_pause(cpus, start_time, 0);
1396
1397 return err;
1398 }
1399 EXPORT_SYMBOL_GPL(resume_cpus);
1400
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week