[platform-drivers-x86:review-dvhart 5/8] drivers/platform/x86/toshiba_acpi.c:3257:22: warning: comparison between pointer and integer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   git://git.infradead.org/users/dvhart/linux-platform-drivers-x86.git review-dvhart
head:   dc8ad7e387eb593dc5a3bddf78d630d99243728d
commit: 79cd91bd841cd4de30efe2d46e26bd98016d635e [5/8] platform/x86: toshiba_acpi: Update KBD backlight LED on second gen laptops
config: x86_64-randconfig-x001-201824 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        git checkout 79cd91bd841cd4de30efe2d46e26bd98016d635e
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   drivers/platform/x86/toshiba_acpi.c: In function 'toshiba_acpi_notify':
>> drivers/platform/x86/toshiba_acpi.c:3257:22: warning: comparison between pointer and integer
         (&dev->kbd_mode == SCI_KBD_MODE_ON) ?
                         ^~

vim +3257 drivers/platform/x86/toshiba_acpi.c

  3216	
  3217	static void toshiba_acpi_notify(struct acpi_device *acpi_dev, u32 event)
  3218	{
  3219		struct toshiba_acpi_dev *dev = acpi_driver_data(acpi_dev);
  3220	
  3221		switch (event) {
  3222		case 0x80: /* Hotkeys and some system events */
  3223			/*
  3224			 * Machines with this WMI GUID aren't supported due to bugs in
  3225			 * their AML.
  3226			 *
  3227			 * Return silently to avoid triggering a netlink event.
  3228			 */
  3229			if (wmi_has_guid(TOSHIBA_WMI_EVENT_GUID))
  3230				return;
  3231			toshiba_acpi_process_hotkeys(dev);
  3232			break;
  3233		case 0x81: /* Dock events */
  3234		case 0x82:
  3235		case 0x83:
  3236			pr_info("Dock event received %x\n", event);
  3237			break;
  3238		case 0x88: /* Thermal events */
  3239			pr_info("Thermal event received\n");
  3240			break;
  3241		case 0x8f: /* LID closed */
  3242		case 0x90: /* LID is closed and Dock has been ejected */
  3243			break;
  3244		case 0x8c: /* SATA power events */
  3245		case 0x8b:
  3246			pr_info("SATA power event received %x\n", event);
  3247			break;
  3248		case 0x92: /* Keyboard backlight mode changed */
  3249			dev->kbd_event_generated = true;
  3250			/* Update sysfs entries */
  3251			if (sysfs_update_group(&acpi_dev->dev.kobj,
  3252					       &toshiba_attr_group))
  3253				pr_err("Unable to update sysfs entries\n");
  3254			/* Notify LED subsystem about keyboard backlight change */
  3255			if (dev->kbd_type == 2 && dev->kbd_mode != SCI_KBD_MODE_AUTO)
  3256				led_classdev_notify_brightness_hw_changed(&dev->kbd_led,
> 3257						(&dev->kbd_mode == SCI_KBD_MODE_ON) ?
  3258						LED_FULL : LED_OFF);
  3259			break;
  3260		case 0x85: /* Unknown */
  3261		case 0x8d: /* Unknown */
  3262		case 0x8e: /* Unknown */
  3263		case 0x94: /* Unknown */
  3264		case 0x95: /* Unknown */
  3265		default:
  3266			pr_info("Unknown event received %x\n", event);
  3267			break;
  3268		}
  3269	
  3270		acpi_bus_generate_netlink_event(acpi_dev->pnp.device_class,
  3271						dev_name(&acpi_dev->dev),
  3272						event, (event == 0x80) ?
  3273						dev->last_key_event : 0);
  3274	}
  3275	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux