From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7CCCC2D0F8 for ; Wed, 13 May 2020 06:50:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C4D4323128 for ; Wed, 13 May 2020 06:50:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589352649; bh=wim/3pCx9DK4B0YG8gKaM83yFjabLaHMvWcVqY4/4HQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=fR6UnxG7uWnPZmXxDiKhW6VL62FDisvOdXycyBU1CLSE7QEpXylyfAfy2SdeVdjw4 Sq1K9Odqgybjitct1mTk99TAoDwdztPR6cTQVVappLWbAYqzSnyIlLoyt6TBRRdBmX inIZ7JKFP+T1qq3P/st5WyhZERxUgDFMNjjiLZO0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729578AbgEMGut (ORCPT ); Wed, 13 May 2020 02:50:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:33226 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729367AbgEMGut (ORCPT ); Wed, 13 May 2020 02:50:49 -0400 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 339AE20708; Wed, 13 May 2020 06:50:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589352648; bh=wim/3pCx9DK4B0YG8gKaM83yFjabLaHMvWcVqY4/4HQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ABPoje9RFWk8hFzzmHAuKhl2ETW1ZOzLN1lmp1u6iBwSFTi8c0KiQ6PqL0bW4fFIA oW5IRrwXAdQpO8nZL9Jbm7qRwzkiebxybVvfJzwAs4NoIX8w+gQDegVnPcHezm6Fpl Xn5dSBmjsdYeM5Qsj81AZX1ItVRy8TV3dsF9DIlI= Date: Wed, 13 May 2020 08:50:46 +0200 From: Greg Kroah-Hartman To: Scott Branden Cc: Luis Chamberlain , David Brown , Alexander Viro , Shuah Khan , bjorn.andersson@linaro.org, Shuah Khan , Arnd Bergmann , "Rafael J . Wysocki" , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-fsdevel@vger.kernel.org, BCM Kernel Feedback , Olof Johansson , Andrew Morton , Dan Carpenter , Colin Ian King , Kees Cook , Takashi Iwai , linux-kselftest@vger.kernel.org, Andy Gross , Desmond Yan , James Hu Subject: Re: [PATCH v5 6/7] misc: bcm-vk: add Broadcom VK driver Message-ID: <20200513065046.GA764247@kroah.com> References: <20200508002739.19360-1-scott.branden@broadcom.com> <20200508002739.19360-7-scott.branden@broadcom.com> <20200513003830.GJ11244@42.do-not-panic.com> <60372b2f-c03d-6384-43a7-8b97413b6672@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <60372b2f-c03d-6384-43a7-8b97413b6672@broadcom.com> Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org On Tue, May 12, 2020 at 11:31:28PM -0700, Scott Branden wrote: > Hi Luis, > > On 2020-05-12 5:38 p.m., Luis Chamberlain wrote: > > On Thu, May 07, 2020 at 05:27:38PM -0700, Scott Branden wrote: > > > +#if defined(CONFIG_REQ_FW_INTO_BUF_PRIV) > > > + > > > +#define KERNEL_PREAD_FLAG_PART 0x0001 /* Allow reading part of file */ > > > +#define REQUEST_FIRMWARE_INTO_BUF request_firmware_into_buf_priv > > > +int request_firmware_into_buf_priv(const struct firmware **firmware_p, > > > + const char *name, struct device *device, > > > + void *buf, size_t size, > > > + size_t offset, unsigned int pread_flags); > > > + > > > +#else > > > + > > > +#define REQUEST_FIRMWARE_INTO_BUF request_firmware_into_buf > > > + > > > +#endif > > > + > > > +#endif > > Please clean this up, the code must reflect only the code upstream. No > > config stuff like this should be used on the driver. I had to stop my > > review here. > The CONFIG_ prefix shouldn't have been there as there is no Kconfig option > to select this. > Would like to just change it to a normal define without CONFIG_ prefix > instead? > This code is here to allow a limited version of the driver to run on older > kernels which do not have the necessary partial file read support. > By having it in the upstream codebase we don't need to maintain an internal > version of the driver.  User can take the upstream kernel module and compile > it against an old version of the kernel by via the define. That's not how kernel drivers in the tree work, sorry. They do not contain "older kernel support" in them, they work as a whole with the rest of the kernel they ship with only. Otherwise all drivers would be a total mess over time, can you imagine doing this for the next 20+ years? Not maintainable. thanks, greg k-h