Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rtc: pcf85063: scope pcf85063_config structures

Fix possible warning:
>> drivers/rtc/rtc-pcf85063.c:566:37: warning: unused variable 'config_rv8063' [-Wunused-const-variable]
566 | static const struct pcf85063_config config_rv8063 = {
| ^~~~~~~~~~~~~

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202507241607.dmz2qrO5-lkp@intel.com/
Link: https://lore.kernel.org/r/20250724090420.917705-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

+47 -47
+47 -47
drivers/rtc/rtc-pcf85063.c
··· 528 528 } 529 529 #endif 530 530 531 - static const struct pcf85063_config config_pcf85063 = { 532 - .regmap = { 533 - .reg_bits = 8, 534 - .val_bits = 8, 535 - .max_register = 0x0a, 536 - }, 537 - }; 538 - 539 - static const struct pcf85063_config config_pcf85063tp = { 540 - .regmap = { 541 - .reg_bits = 8, 542 - .val_bits = 8, 543 - .max_register = 0x0a, 544 - }, 545 - }; 546 - 547 - static const struct pcf85063_config config_pcf85063a = { 548 - .regmap = { 549 - .reg_bits = 8, 550 - .val_bits = 8, 551 - .max_register = 0x11, 552 - }, 553 - .has_alarms = 1, 554 - }; 555 - 556 - static const struct pcf85063_config config_rv8263 = { 557 - .regmap = { 558 - .reg_bits = 8, 559 - .val_bits = 8, 560 - .max_register = 0x11, 561 - }, 562 - .has_alarms = 1, 563 - .force_cap_7000 = 1, 564 - }; 565 - 566 - static const struct pcf85063_config config_rv8063 = { 567 - .regmap = { 568 - .reg_bits = 8, 569 - .val_bits = 8, 570 - .max_register = 0x11, 571 - .read_flag_mask = BIT(7) | BIT(5), 572 - .write_flag_mask = BIT(5), 573 - }, 574 - .has_alarms = 1, 575 - .force_cap_7000 = 1, 576 - }; 577 - 578 531 static int pcf85063_probe(struct device *dev, struct regmap *regmap, int irq, 579 532 const struct pcf85063_config *config) 580 533 { ··· 624 671 625 672 #if IS_ENABLED(CONFIG_I2C) 626 673 674 + static const struct pcf85063_config config_pcf85063 = { 675 + .regmap = { 676 + .reg_bits = 8, 677 + .val_bits = 8, 678 + .max_register = 0x0a, 679 + }, 680 + }; 681 + 682 + static const struct pcf85063_config config_pcf85063tp = { 683 + .regmap = { 684 + .reg_bits = 8, 685 + .val_bits = 8, 686 + .max_register = 0x0a, 687 + }, 688 + }; 689 + 690 + static const struct pcf85063_config config_pcf85063a = { 691 + .regmap = { 692 + .reg_bits = 8, 693 + .val_bits = 8, 694 + .max_register = 0x11, 695 + }, 696 + .has_alarms = 1, 697 + }; 698 + 699 + static const struct pcf85063_config config_rv8263 = { 700 + .regmap = { 701 + .reg_bits = 8, 702 + .val_bits = 8, 703 + .max_register = 0x11, 704 + }, 705 + .has_alarms = 1, 706 + .force_cap_7000 = 1, 707 + }; 708 + 627 709 static const struct i2c_device_id pcf85063_ids[] = { 628 710 { "pca85073a", .driver_data = (kernel_ulong_t)&config_pcf85063a }, 629 711 { "pcf85063", .driver_data = (kernel_ulong_t)&config_pcf85063 }, ··· 730 742 #endif /* IS_ENABLED(CONFIG_I2C) */ 731 743 732 744 #if IS_ENABLED(CONFIG_SPI_MASTER) 745 + 746 + static const struct pcf85063_config config_rv8063 = { 747 + .regmap = { 748 + .reg_bits = 8, 749 + .val_bits = 8, 750 + .max_register = 0x11, 751 + .read_flag_mask = BIT(7) | BIT(5), 752 + .write_flag_mask = BIT(5), 753 + }, 754 + .has_alarms = 1, 755 + .force_cap_7000 = 1, 756 + }; 733 757 734 758 static const struct spi_device_id rv8063_id[] = { 735 759 { "rv8063" },