Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3234772ybd; Fri, 28 Jun 2019 05:16:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqx28xGSGqNgGyRa1n8Fm7WQLfBoON6YHuQn2wukVtIAotO7NiDaQP14vUR0VmB0xsHlWE1u X-Received: by 2002:a17:90a:1ac5:: with SMTP id p63mr12564408pjp.25.1561724164526; Fri, 28 Jun 2019 05:16:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561724164; cv=none; d=google.com; s=arc-20160816; b=CaDS0H9KUD7NZ3PlxNSR7+ztTX6pu+i2GsdHk2peCA4wJASvIytAl77/NtvNxvmkDo rpP9ZS5hG9QYK4ltz3gbylBHTIFkirSVmbsUY7YwqKPm6I2CPyUe6QUIlWIdZCD9pT8G XaiN2JpPP20HdnAvnVZRAn0Yx2+DMGWp2s9zo3elDpeqk91ybL9ksGmQ/RAW+vxWIC21 6HMEBtk+6N13rjUbh2vDmwDdG48Iau6sm5ks0DXwvhJSktBGoePdOIJG+SDomkC+mxHB WCtmiXdosND4OGUU6r+Ax2PEWpf0wQztJ/hxe/wqq5Qrmf8kwKaMf+KbEGXhdxvNkayj X6Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=1TAwC61JS4eXqZ82OujM9dlobazLqVa1FIeOqHjXlt0=; b=eFmPZIapbhX+kEtzi3VrWRuevz/yLYg95jiSB/x/Mv8yTD20l90NYIZX+eIRL8mmTb hgFRleeFnOe+7FUgqqhKX5u7iYsWmoSz6XzdMSaYJOoZRrucm3h/+QaRuwyc4b3sL0Vh RwWcAqFnhieiFFDsydc41zmsyzuQGNQ3k0v04y0AaxLi8/Gg/12NS35+UH61sh0rBZ31 Y2uVu1lf/EDB+z6PiuEU0h/IzcPMym1uEOUCaYKEeEfnZQ3BoQXJ87eFZNDGfVOsYy1R PEPI3Jj1mRSNl/C1dB2VMfmhFKhI/hMYP2RO8sGOtiwMcNXwGC+OEGVOk6vp4lGwte6a a3bw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w9si2066562plp.118.2019.06.28.05.15.48; Fri, 28 Jun 2019 05:16:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726930AbfF1MPD (ORCPT + 99 others); Fri, 28 Jun 2019 08:15:03 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:33211 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726542AbfF1MPC (ORCPT ); Fri, 28 Jun 2019 08:15:02 -0400 Received: by mail-qk1-f196.google.com with SMTP id r6so4587553qkc.0; Fri, 28 Jun 2019 05:15:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1TAwC61JS4eXqZ82OujM9dlobazLqVa1FIeOqHjXlt0=; b=Yhs8q16ww190EQsZo2yQwQr8JXW0IK8KDmoshG9U73ABjiE+FENH8UCQH4MKnQnRzp vUGK55+3w5xZMPiHlwxnIXWzYEsnLspqvchDdXAoQxk91klCmy+3peLowrsE3iqzrj3A dgnBp/WuyJNTYIcv9PuEX9IcrKGhmvpj6pB/tT7SU6hBwRWfJQC/Qa//y5ZjCqCp82/f 9tjQ2pnBU8zJkhkP3DwIRYYB9rw9BL1ANvcoAZj/1uSSqlcigg28PufETdzUkVpFKLYf 0OMODFSWoj6w6ifhDW62rdNjjB1NoZ/ubZOuefC/3lVcGTAWcONuNEAA6qrLSvPMT6BJ pWGg== X-Gm-Message-State: APjAAAU0qa7x1iyRAUMBISbgF33ea5/UCXbjgKeEYRV9pF04boZ6/cPQ yDruNcCdlGNcnK1o41/ywn81Xaj7K9Mmpln6AjzZUr+N X-Received: by 2002:a37:ad12:: with SMTP id f18mr8197153qkm.3.1561724101537; Fri, 28 Jun 2019 05:15:01 -0700 (PDT) MIME-Version: 1.0 References: <20190313211709.486583-1-arnd@arndb.de> <20190403163444.2psjymq5kb3c6ok6@gofer.mess.org> In-Reply-To: <20190403163444.2psjymq5kb3c6ok6@gofer.mess.org> From: Arnd Bergmann Date: Fri, 28 Jun 2019 14:14:42 +0200 Message-ID: Subject: Re: [PATCH] media: dib0700: fix link error for dibx000_i2c_set_speed To: Sean Young Cc: Mauro Carvalho Chehab , Kees Cook , "Gustavo A. R. Silva" , Colin Ian King , Linux Media Mailing List , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 3, 2019 at 6:34 PM Sean Young wrote: > > On Wed, Mar 13, 2019 at 10:16:53PM +0100, Arnd Bergmann wrote: > > When CONFIG_DVB_DIB9000 is disabled, we can still compile code that > > now fails to link against dibx000_i2c_set_speed: > > > > drivers/media/usb/dvb-usb/dib0700_devices.o: In function `dib01x0_pmu_update.constprop.7': > > dib0700_devices.c:(.text.unlikely+0x1c9c): undefined reference to `dibx000_i2c_set_speed' > > > > The call sites are both through dib01x0_pmu_update(), which gets > > passed an 'i2c' pointer from dib9000_get_i2c_master(), which has > > returned NULL. Checking this pointer seems to be a good idea > > anyway, and it avoids the link failure. > > So I reproduced the link failure with attached config, and your patch > does not fix it. I ran into the old problem I reported once more, and checked my original patch, as well as your configuration file, which indeed shows the same symptom. Interestingly, the link error after my patch appears to be the result of a compiler bug, as the function reference is from dead code that should have been eliminated. Sending a replacement patch now. Arnd