Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1030402pxb; Wed, 1 Sep 2021 15:46:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrWUSAVmoRQ+I6e7CTgsPBnr2tOfBj9o5vJQoYL6AEnMPSanBEV1sI+PZ5gzCakjinj/4s X-Received: by 2002:a17:906:16c4:: with SMTP id t4mr216370ejd.302.1630536361128; Wed, 01 Sep 2021 15:46:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630536361; cv=none; d=google.com; s=arc-20160816; b=FH86Owe1hki7xePBOw29k/F662tEJhXPhcPj++ohDJQbfe0yNNYgJoZSqdxMCIFkSq 9iLeM9x0xZObidFgC0nsP7snD+bKFevMsKgMIAkoUK6cwwxMitQy0NH+685mNzNjGOmV n4ohZWHs81n8yllyyFJlLx0jYBj4K0W8S5wgZwe1wM/J3xV7YlpX9CLCr3Nst/7Dih8x lSQ1Y+Pxfdjeqk+7ASnbZ0eeHdj3YEHncmo8+xWKsvOMzp/eJvVJ2HqZKkKbttErq/0v QvlX/IrzWzbH/3TePJMr5N3IA0cYVxN/TsH+PcMqcJTlelDTnUH7DHpVt5mCSyIOY9UH mXAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:reply-to:cc:from:to :dkim-signature:date; bh=WVOsQI5nD1PtXvSuDOtR2xqDg1KdImjbJxPWDJVWN2I=; b=qKVkrr5hgy+WL34SCL3TztYq2oC7nnJ3HY3ofGme5O0SQ0qlM9xr/RnFx23tVOAqZz TIMwQMwIp2xU/2BrIHUJ1BWggaY3LYBsjFxF071Pfz8/XXnW7QbQ3L2ORdFLys4oaNIg D6dhv2wtSAq58Dqr97/GRcFgOhs4TGYJ/HVpiyct33edb0ZykgDM8wDh5qQsE5ey3JVr h1TzvyTqy8UWDr20Jso+JcFn9Jg6+0Qvxtq/1uWGLY37Qn+rCEwTgCor7iKf4Pr9bIoP zFDHINfI87yIfh52SGEOpsuwUpSJ7RhPjEVYmOTaznVopVyYXKc/yzZsYKH+1ePYUfLP g6DQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bryanbrattlof.com header.s=protonmail header.b=hKwqPPNr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bryanbrattlof.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d16si1122834ejm.114.2021.09.01.15.45.36; Wed, 01 Sep 2021 15:46:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@bryanbrattlof.com header.s=protonmail header.b=hKwqPPNr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bryanbrattlof.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231254AbhIAUaH (ORCPT + 99 others); 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 X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch 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