From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751462AbdBXUos (ORCPT ); Fri, 24 Feb 2017 15:44:48 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:60614 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751219AbdBXUol (ORCPT ); Fri, 24 Feb 2017 15:44:41 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 7A1FB60D62 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sboyd@codeaurora.org Date: Fri, 24 Feb 2017 12:44:39 -0800 From: Stephen Boyd To: Leonard Crestez Cc: Michael Turquette , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] clk: core: Copy connection id Message-ID: <20170224204439.GD25384@codeaurora.org> References: <60d115f6c11bc51cd8bc10c64cd222c3cdb43cc7.1487596492.git.leonard.crestez@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <60d115f6c11bc51cd8bc10c64cd222c3cdb43cc7.1487596492.git.leonard.crestez@nxp.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/20, Leonard Crestez wrote: > Some drivers use sprintf to build clk connection id names but the clk > core will save those strings and occasionally print them back. Duplicate > the con_id strings instead of fixing all the users. > > Signed-off-by: Leonard Crestez > --- > drivers/clk/clk.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > Some examples of using sprintf for con_id include: > drivers/mfd/omap-usb-host.c > drivers/tty/serial/samsung.c > sound/soc/fsl/fsl_asrc.c > > There are lots more. They are difficult to find and "fixing" them on the > consumer side requires nasty code to keep track of the allocated clkname. Good catch. What about dev_id though? That could also have the same problem if some device is removed and we're still holding a reference to the kobject's name. This is probably more rare than what is happening here, but still seems possible that we might trip over that later. -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project