linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [linux-next:master 5270/6646] drivers/media/pci/ttpci/av7110_ir.c:69: undefined reference to `rc_keydown'
@ 2019-06-16  6:53 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2019-06-16  6:53 UTC (permalink / raw)
  To: Sean Young; +Cc: kbuild-all, Mauro Carvalho Chehab, linux-media

[-- Attachment #1: Type: text/plain, Size: 5755 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   f4788d37bc84e27ac9370be252afb451bf6ef718
commit: 71f49a8bf5c592413edb5c8839ec0e6d754db3e1 [5270/6646] media: ttpci: use rc-core for the IR receiver
config: x86_64-randconfig-a0-06161326 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        git checkout 71f49a8bf5c592413edb5c8839ec0e6d754db3e1
        # save the attached .config to linux build tree
        make ARCH=x86_64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   ld: drivers/media/pci/ttpci/av7110_ir.o: in function `av7110_ir_handler':
>> drivers/media/pci/ttpci/av7110_ir.c:69: undefined reference to `rc_keydown'
   ld: drivers/media/pci/ttpci/av7110_ir.o: in function `av7110_ir_init':
>> drivers/media/pci/ttpci/av7110_ir.c:113: undefined reference to `rc_allocate_device'
>> ld: drivers/media/pci/ttpci/av7110_ir.c:145: undefined reference to `rc_register_device'
>> ld: drivers/media/pci/ttpci/av7110_ir.c:148: undefined reference to `rc_free_device'
   ld: drivers/media/pci/ttpci/av7110_ir.o: in function `av7110_ir_exit':
>> drivers/media/pci/ttpci/av7110_ir.c:156: undefined reference to `rc_unregister_device'

vim +69 drivers/media/pci/ttpci/av7110_ir.c

    19	
    20	/* interrupt handler */
    21	void av7110_ir_handler(struct av7110 *av7110, u32 ircom)
    22	{
    23		struct rc_dev *rcdev = av7110->ir.rcdev;
    24		enum rc_proto proto;
    25		u32 command, addr, scancode;
    26		u32 toggle;
    27	
    28		dprintk(4, "ir command = %08x\n", ircom);
    29	
    30		if (rcdev) {
    31			switch (av7110->ir.ir_config) {
    32			case IR_RC5: /* RC5: 5 bits device address, 6 bits command */
    33				command = ircom & 0x3f;
    34				addr = (ircom >> 6) & 0x1f;
    35				scancode = RC_SCANCODE_RC5(addr, command);
    36				toggle = ircom & 0x0800;
    37				proto = RC_PROTO_RC5;
    38				break;
    39	
    40			case IR_RCMM: /* RCMM: ? bits device address, ? bits command */
    41				command = ircom & 0xff;
    42				addr = (ircom >> 8) & 0x1f;
    43				scancode = ircom;
    44				toggle = ircom & 0x8000;
    45				proto = RC_PROTO_UNKNOWN;
    46				break;
    47	
    48			case IR_RC5_EXT:
    49				/*
    50				 * extended RC5: 5 bits device address, 7 bits command
    51				 *
    52				 * Extended RC5 uses only one start bit. The second
    53				 * start bit is re-assigned bit 6 of the command bit.
    54				 */
    55				command = ircom & 0x3f;
    56				addr = (ircom >> 6) & 0x1f;
    57				if (!(ircom & 0x1000))
    58					command |= 0x40;
    59				scancode = RC_SCANCODE_RC5(addr, command);
    60				toggle = ircom & 0x0800;
    61				proto = RC_PROTO_RC5;
    62				break;
    63			default:
    64				dprintk(2, "unknown ir config %d\n",
    65					av7110->ir.ir_config);
    66				return;
    67			}
    68	
  > 69			rc_keydown(rcdev, proto, scancode, toggle != 0);
    70		}
    71	}
    72	
    73	int av7110_set_ir_config(struct av7110 *av7110)
    74	{
    75		dprintk(4, "ir config = %08x\n", av7110->ir.ir_config);
    76	
    77		return av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, SetIR, 1,
    78				     av7110->ir.ir_config);
    79	}
    80	
    81	static int change_protocol(struct rc_dev *rcdev, u64 *rc_type)
    82	{
    83		struct av7110 *av7110 = rcdev->priv;
    84		u32 ir_config;
    85	
    86		if (*rc_type & RC_PROTO_BIT_UNKNOWN) {
    87			ir_config = IR_RCMM;
    88			*rc_type = RC_PROTO_UNKNOWN;
    89		} else if (*rc_type & RC_PROTO_BIT_RC5) {
    90			if (FW_VERSION(av7110->arm_app) >= 0x2620)
    91				ir_config = IR_RC5_EXT;
    92			else
    93				ir_config = IR_RC5;
    94			*rc_type = RC_PROTO_BIT_RC5;
    95		} else {
    96			return -EINVAL;
    97		}
    98	
    99		if (ir_config == av7110->ir.ir_config)
   100			return 0;
   101	
   102		av7110->ir.ir_config = ir_config;
   103	
   104		return av7110_set_ir_config(av7110);
   105	}
   106	
   107	int av7110_ir_init(struct av7110 *av7110)
   108	{
   109		struct rc_dev *rcdev;
   110		struct pci_dev *pci;
   111		int ret;
   112	
 > 113		rcdev = rc_allocate_device(RC_DRIVER_SCANCODE);
   114		if (!rcdev)
   115			return -ENOMEM;
   116	
   117		pci = av7110->dev->pci;
   118	
   119		snprintf(av7110->ir.input_phys, sizeof(av7110->ir.input_phys),
   120			 "pci-%s/ir0", pci_name(pci));
   121	
   122		rcdev->device_name = av7110->card_name;
   123		rcdev->driver_name = KBUILD_MODNAME;
   124		rcdev->input_phys = av7110->ir.input_phys;
   125		rcdev->input_id.bustype = BUS_PCI;
   126		rcdev->input_id.version = 2;
   127		if (pci->subsystem_vendor) {
   128			rcdev->input_id.vendor	= pci->subsystem_vendor;
   129			rcdev->input_id.product = pci->subsystem_device;
   130		} else {
   131			rcdev->input_id.vendor	= pci->vendor;
   132			rcdev->input_id.product = pci->device;
   133		}
   134	
   135		rcdev->dev.parent = &pci->dev;
   136		rcdev->allowed_protocols = RC_PROTO_BIT_RC5 | RC_PROTO_BIT_UNKNOWN;
   137		rcdev->change_protocol = change_protocol;
   138		rcdev->map_name = RC_MAP_HAUPPAUGE;
   139		rcdev->priv = av7110;
   140	
   141		av7110->ir.rcdev = rcdev;
   142		av7110->ir.ir_config = IR_RC5;
   143		av7110_set_ir_config(av7110);
   144	
 > 145		ret = rc_register_device(rcdev);
   146		if (ret) {
   147			av7110->ir.rcdev = NULL;
 > 148			rc_free_device(rcdev);
   149		}
   150	
   151		return ret;
   152	}
   153	
   154	void av7110_ir_exit(struct av7110 *av7110)
   155	{
 > 156		rc_unregister_device(av7110->ir.rcdev);
   157	}
   158	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29101 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-06-16  6:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-16  6:53 [linux-next:master 5270/6646] drivers/media/pci/ttpci/av7110_ir.c:69: undefined reference to `rc_keydown' kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).