From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750838AbdE1RJQ (ORCPT ); Sun, 28 May 2017 13:09:16 -0400 Received: from www.llwyncelyn.cymru ([82.70.14.225]:44490 "EHLO fuzix.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750784AbdE1RJP (ORCPT ); Sun, 28 May 2017 13:09:15 -0400 Date: Sun, 28 May 2017 18:08:53 +0100 From: Alan Cox To: Hans de Goede Cc: Lee Jones , Chen-Yu Tsai , linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 2/7] staging: atomisp: Do not call dev_warn with a NULL device Message-ID: <20170528180853.5a6c8f11@alans-desktop> In-Reply-To: <20170528123040.18555-2-hdegoede@redhat.com> References: <20170528123040.18555-1-hdegoede@redhat.com> <20170528123040.18555-2-hdegoede@redhat.com> Organization: Intel Corporation X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 28 May 2017 14:30:35 +0200 Hans de Goede wrote: > Do not call dev_warn with a NULL device, this silence the following 2 > warnings: > > [ 14.392194] (NULL device *): Failed to find gmin variable gmin_V2P8GPIO > [ 14.392257] (NULL device *): Failed to find gmin variable gmin_V1P8GPIO > > We could switch to using pr_warn for dev == NULL instead, but as comments > in the source indicate, the check for these 2 special gmin variables with > a NULL device is a workaround for 2 specific evaluation boards, so > completely silencing the missing warning for these actually is a good > thing. At which point real missing variables won't get reported so NAK. I think the right fix is to make the offending callers pass subdev->dev which if my understanding of the subdevices is correct should pass the right valid device field from the atomisp. Please also cc me if you are proposing patches this driver - and also linux-media. Alan