Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp5834410ybx; Sun, 10 Nov 2019 22:42:21 -0800 (PST) X-Google-Smtp-Source: APXvYqxv0N9vuJ6k9gqB7wIoOHNNSuIHotuL/5PmRgloJDHr1nT1UapthTf7F1WmIeW0r9aI6Pp2 X-Received: by 2002:a17:906:6dd1:: with SMTP id j17mr1301676ejt.86.1573454541104; Sun, 10 Nov 2019 22:42:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573454541; cv=none; d=google.com; s=arc-20160816; b=lpBU1ifUr2Y+xqSTTWDlXuZPxa2TZjtNSvDwkUu4y5xjR/bgJHpj38yFRl0E9QKNWP YXTg71fPY/p+o3ScWMGirmapfL4bjPYYhkbltFOUbxG1GIWZFEtp8dxM4ktH+zz9Zc4r YyHkWAkISrB3q8dlLR9ReZyntUDECldfRl2ONmzAPKBZ6FZHNVWNvx3EwGL0AAoXguKK vh6PDdRNLrekBSLOD9Lf5wsZbsI9OTdQPvZgt2F3EeXo2Eff7u0Uxs/BVcUr0x5Vh1+H oYzVkOII6Q8I/NmPqqi1Qtu68qrTZdi9VRk6d8k52hfvn36AZlFG2TKnng3Tgyl+N4uG B2Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=guW9CZgXW87ssky5mgCuwVuDt15jfXGZw6FCPLqaWB8=; b=I3hJtp5+MlV4QNuWpnLDLM0L7kijkJIfxBqAaw87XwuDYR4riyPgn3ABZ5ClC+qUAT akWaOn+9L9wejmI9FdQUGQAqc/4kdpmmmAZhQHr2rF06fR8iX5VnGxzTg2gj5/p1Rv2h MLelmIbW8aBhz0Q6uP1ZHqO8QyGWAsrB609Qa+S35VoG06vYc9ocX437gKMijcfME34f 5WFuNvxynN+4CYbjyORQPl9DD7m577h07z84oQVxBge1SFV3LuwtEuHEHIIoC26k3T+E HMcmnOeXA85lOvF2SEMskAvTLIhUvuuLHPa0Iwf+Upj3FSFBiJIAG7ovSOlZSxzedGck cCSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=D9AYN0qR; 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 a11si12914974edj.143.2019.11.10.22.41.57; Sun, 10 Nov 2019 22:42:21 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=D9AYN0qR; 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 S1726871AbfKKGko (ORCPT + 99 others); Mon, 11 Nov 2019 01:40:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:57046 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726789AbfKKGkn (ORCPT ); Mon, 11 Nov 2019 01:40:43 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4C61420818; Mon, 11 Nov 2019 06:40:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573454442; bh=cktYl62Ynev3YcbNhpece5Z14fVDGbQyuOjqOeQf4Gc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=D9AYN0qRT9g+HjcozyPSfAxeXGwrD/p62xk0fGvNIEwwbe+jeCiTdU8Z02UVy8mBU 6EhCkCncoqGPQRkmPCtjtIcB0iFmEimLIfokLW8QumwPcVen8DJd5ozAHFuDbPRuWF ps+wnu+3R+bj461e+l6N90ZizCpBxyUGAqcNdeRQ= Date: Mon, 11 Nov 2019 07:40:40 +0100 From: Greg Kroah-Hartman To: Andreas =?iso-8859-1?Q?F=E4rber?= Cc: linux-realtek-soc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Lee Jones , Bjorn Andersson , Geert Uytterhoeven , "Rafael J. Wysocki" Subject: Re: [PATCH] base: soc: Export soc_device_to_device() helper Message-ID: <20191111064040.GA3502217@kroah.com> References: <20191103013645.9856-3-afaerber@suse.de> <20191111045609.7026-1-afaerber@suse.de> <20191111052741.GB3176397@kroah.com> <586fa37c-6292-aca4-fa7c-73064858afaf@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <586fa37c-6292-aca4-fa7c-73064858afaf@suse.de> User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 11, 2019 at 06:42:05AM +0100, Andreas F?rber wrote: > Hi Greg, > > Am 11.11.19 um 06:27 schrieb Greg Kroah-Hartman: > > On Mon, Nov 11, 2019 at 05:56:09AM +0100, Andreas F?rber wrote: > >> Use of soc_device_to_device() in driver modules causes a build failure. > >> Given that the helper is nicely documented in include/linux/sys_soc.h, > >> let's export it as GPL symbol. > > > > I thought we were fixing the soc drivers to not need this. What > > happened to that effort? I thought I had patches in my tree (or > > someone's tree) that did some of this work already, such that this > > symbol isn't needed anymore. > > I do still see this function used in next-20191108 in drivers/soc/. > > I'll be happy to adjust my RFC driver if someone points me to how! Look at c31e73121f4c ("base: soc: Handle custom soc information sysfs entries") for how you can just use the default attributes for the soc to create the needed sysfs files, instead of having to do it "by hand" which is racy and incorrect. > Given the current struct layout, a type cast might work (but ugly). > Or if we stay with my current RFC driver design, we could use the > platform_device instead of the soc_device (which would clutter the > screen more than "soc soc0:") or resort to pr_info() w/o device. Ick, no, don't cast blindly. What do you need the pointer for? Is this for in-tree code? thanks, greg k-h