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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 622F5C432BE for ; Wed, 1 Sep 2021 20:29:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3C07B6101B for ; Wed, 1 Sep 2021 20:29:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231288AbhIAUaH (ORCPT ); Wed, 1 Sep 2021 16:30:07 -0400 Received: from mail-4322.protonmail.ch ([185.70.43.22]:10715 "EHLO mail-4322.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230320AbhIAUaG (ORCPT ); Wed, 1 Sep 2021 16:30:06 -0400 Date: Wed, 01 Sep 2021 20:29:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bryanbrattlof.com; s=protonmail; t=1630528147; bh=WVOsQI5nD1PtXvSuDOtR2xqDg1KdImjbJxPWDJVWN2I=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=hKwqPPNrZm8VnLoyFPUke5rYmRryiW7+1RiC5lX8+vK60EpgTqXD06rCHuuC6ylq/ /mTnDOVFyUIk2zx4zjhYbRHt0hiQLgBUuRhCG7PTzbUnKktH1jhLM8ZkHVjqwZpM4l O5Byvp2TDqM5SDfFN1LttfSz2YIg1Uk/Pq6cEK7ZQ9ObB9XuGs5cQCbCancVXD0Tvb xyKYTWoZXD0oLJixV9wPYtqEDfE0BNkaw0MWZV+ESYgHhCqtkhcvqZQrlc37PYx93b jF8h9Tgnv0oDjYolSF0MI8PSdNIaV/yYCx0giAAwe+mBEqtBmuNHkGHXr0uO2GKVH3 pz6KRpBDrTWtQ== To: Krish Jain From: Bryan Brattlof Cc: Greg KH , "Fabio M. De Francesco" , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Reply-To: Bryan Brattlof Subject: Re: [PATCH] Declare the file_operations struct as const Message-ID: <20210901202855.fnoidizshw2uwo3q@h510> In-Reply-To: References: <20210829144531.c2syu4vv4s22dlg7@h510> <13366651.n50aozgL3V@localhost.localdomain> <20210831230014.cp46vho2hnndacjp@h510> <20210901173357.2dfvw5xgpzjndesc@h510> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On this day, September 1, 2021, thus sayeth Krish Jain: > > Yes, lots of reading to do :) . I had a look at the book and it seems > better than the documentation too, I don't know, maybe the writing > style? Love it, Greg. Lastly just out of curiosity, Bryan, if this > can only be built as a built-in object then how come "As for your > patch, I built the driver using: > > $ make CCFLAGS=3D-Werror W=3D1 M=3Ddrivers/staging/android" > > got you the errors that I desired? Aren't you building as a module here? > That's a good question Krish! The command I sent you does not build built-in modules or create the output I sent you! As Greg said, ASHMEM cannot be built as a loadable module! It is odd, when retracing my steps just now, I must have known at some point that ASHMEM was a built-in module as menuconfig will not let you select the or loadable module option. The only thing I can think I did was build the module without using the M=3D option, copied the error message, then retyped the wrong 'make' command I had used to produce it. What is *very* embarrassing is I had multiple opportunities to catch my mistake. Somewhere between building your patch and writing the email I truly lost the critical piece "this is a built-in module". Even the CCFLAGS command Greg talked about is not a great command to be using! I should not have sent you CCFLAGS or the less worse KCFLAGS that I should not be using. Both really have no need here in drivers/staging/ and only add to the confusion. I will say, for your next patch that I am eagerly waiting for, the W=3D1 option is a good way to catch subtle errors that Greg may ask you to fix and resend. I got one thing right :/ I don't know, I truly lost my marbles on this one. I apologize again for my goof, it must have been very frustrating. ~Bryan