Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp3000292pxb; Sun, 29 Aug 2021 09:58:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyoSRKYifNTLyLj23u5xIbEQDU/4IqTlj32W6rp7AFtT3SOm5pFTAd8vd5xaU9Cp+fvMa/s X-Received: by 2002:a17:906:2ac1:: with SMTP id m1mr21203444eje.518.1630256329447; Sun, 29 Aug 2021 09:58:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630256329; cv=none; d=google.com; s=arc-20160816; b=JPPO+orcdzXYSMEZEuCqOJdCjKSuSOYCKibYWZJZs91Sy0EN/Bny6HWPKcc716TTVm bf+SC1zjnOytoSWIdOev36lus7JxuBaHEhKLCddDG6uWj3UZVutFt37CfyQ1Qo/TrrXg Vp1jp7QEF9xemblFz2u+BQW5HO8zGkDdwahov9k7CixSpTtGfumNK5+HYLeM+LzLSHwR YjHIU5xnoLp6iQkEUr6dHDqOWqyK5F9cY/kyBTYRsLyy1/QCzFJgQI0ZNQScZ5aQX0G2 QAIhZx7WKIE/HvBK1UksmdqSEazc0CbbXCq1As2CJe7bwh0ZsDeor0AzdUisVk2DJw1e DviA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=YLvZ3sGYfQ+oBKbVK1D5xdIEOxEaX+9yoh7blhMmsNA=; b=XoUVNBkyIYfd1iztdIvEc2wmuxbhijbVwG8R1CKIydNztOvXmgsYLBkQbZG8HOVJgR UfsC7vpNgWcemfVe+/ykiVh1CgxykKHDctmbJ848Y+bp0JTCz1Zw7uwlVcmyAqPJgNMr eo3hro3vzLoA8wecjuOs55LeLTeYRVZd2nCHNMJ6qyhPcq4uymiVs8Fsx0kUixpGGo1T /HK9bFAp1281IXtWjtg/db9ujRWN1bewULMB6XK/3FQl0Irs7M+2yS39BYiTx8NW2aWp v+0lNTlGbyIfcwxIEjbHmZQ44wtPxmDvTxkbG1evhu3vXFotNDKjXOHsPK8Ae6CVhAg/ SFmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=g7Msz3v6; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qw26si13274014ejc.258.2021.08.29.09.58.23; Sun, 29 Aug 2021 09:58:49 -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=@gmail.com header.s=20161025 header.b=g7Msz3v6; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229838AbhH2Q5y (ORCPT + 99 others); Sun, 29 Aug 2021 12:57:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229692AbhH2Q5x (ORCPT ); Sun, 29 Aug 2021 12:57:53 -0400 Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99D6AC061575 for ; Sun, 29 Aug 2021 09:57:01 -0700 (PDT) Received: by mail-pg1-x533.google.com with SMTP id s11so11054194pgr.11 for ; Sun, 29 Aug 2021 09:57:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=YLvZ3sGYfQ+oBKbVK1D5xdIEOxEaX+9yoh7blhMmsNA=; b=g7Msz3v6Ze5CPdGMYauSyD7ARokHfkuyVOJio2FhPVX6HhbGZncTsYpF9R9O9aQ+Lh f1ebMTbgx5QxuW/JLHEjhtGBh0O3yhiL0mysNwZ2IM06J9gQzfKrwGRq3f0pYipM82tK 8Md7P+Tz5t/OKKmBwJC5VJZvDmabAwbKQtLOJ+icx74HvFEW5vKw96csqz/IwjXy0ftg rLPSCP+fezQsLwBYcNMjcsjDWe9ogliuVnQIl/rgc+XsWSICghtzQfOJsaQ70TOt5Wpk pZWBc1cONHSF/EKkdjUKXt7Eqm9fsmWSkjieOzWX4UZeVVmdHF+ikiEF4My6Hc9YsGm3 ifdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=YLvZ3sGYfQ+oBKbVK1D5xdIEOxEaX+9yoh7blhMmsNA=; b=GNiAFDSqieuGODnrqPrOAE9M+NeoWdSNyKeTr3ny6asi41E2giWaCQ6PpnfMOEfhDI Q514czxnePtQT1ZVcwuX4A8yWrFQNmK9v+ivJFQGAk7S1hq6kjAkp3zSSBy6iOv7ChHd hkELorMECWcB8sWcWWwVhPWSt5oqE3ZAfAB7II1d/UVR2q66R8DpSfFSulVtZisGRum8 oI6/mC1WUW6POI0slBSeY7VvrhspKtBS0An/Kp4YE/gjP3o5OaEFTC+H/QUhbHUJa023 xqdVYldnwc8BTSDokdATwkl45R1vrlj/ijzoe+zSjOX8bDJH53TwcqJpKAl9EzqfLt0i O2+g== X-Gm-Message-State: AOAM531F6tW1FZG9jaEHygDn1pxWtKLwsaEseFL9K0ingxeI7PQTrntm cOwB8NkAlfReLnmGIqENASwfAklOwqL/d3TMh6rnnVTqFwOafaQk X-Received: by 2002:aa7:9d02:0:b0:3f3:df3b:81ae with SMTP id k2-20020aa79d02000000b003f3df3b81aemr13026930pfp.19.1630256221133; Sun, 29 Aug 2021 09:57:01 -0700 (PDT) MIME-Version: 1.0 References: <20210829144531.c2syu4vv4s22dlg7@h510> <20210829164921.u5ntqk5jz2v3hlgr@h510> In-Reply-To: <20210829164921.u5ntqk5jz2v3hlgr@h510> From: Krish Jain Date: Sun, 29 Aug 2021 18:56:50 +0200 Message-ID: Subject: Re: [PATCH] Declare the file_operations struct as const To: Bryan Brattlof Cc: Greg KH , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org 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 Sun, Aug 29, 2021 at 6:49 PM Bryan Brattlof wr= ote: > > On this day, August 29, 2021, thus sayeth Krish Jain: > > > > > > > > Hi, what option do you mean? I already ran make allmodconfig and s= udo > > > > make modules_install install and then make "CCFLAGS=3D-Werror W= =3D1 > > > > M=3Ddrivers/staging/android/" and now I do get output but one line > > > > "WARNING: Symbol version dump "Module.symvers" is missing. Modules = may > > > > not have dependencies or modversions. You may get many unresolved > > > > symbol warnings." . Then I tried "make CCFLAGS=3D-Werror V=3D1 > > > > M=3Ddrivers/staging/android/" and that outputted the following: > > > > > > > > > > Most of the answers you're asking for are going to get vague response= s > > > (if any) on the mailing lists. The idea being (and I agree with) that > > > giving out the answers will steal your opportunity to explore and lea= rn > > > the material yourself. > > > > > > Yes, it would be faster if we told you the answer, but ultimately, we > > > would be doing a disservice to you. > > > > > > Besides, more times than not we (me especially) don't have the answer= . > > > > > > With that said, I will give a (generous) hint. :) > > > > > > > Hi. Do I have to build the kernel once before this works? Or can I > > just build a module directly? > > > > Again, do not allow others to rob you of learning how to solve these > issues yourself. I *strongly* encourage you to familiarize yourself with > the Kernel Build System in the Documentation. > > https://www.kernel.org/doc/html/latest/kbuild/modules.html > > Specifically the first paragraph of "2. How to Build External Modules" > > It may seem like a lot for such a simple issue but it *is* worth it. > ~Bryan > That section says "To build external modules, *you must have a prebuilt kernel available* that contains the configuration and header files used in the build. Also, the kernel must have been built with modules enabled. If you are using a distribution kernel, there will be a package for the kernel you are running provided by your distribution. An alternative is to use the =E2=80=9Cmake=E2=80=9D target =E2=80=9Cmodules= _prepare.=E2=80=9D This will make sure the kernel contains the information required. The target exists solely as a simple way to prepare a kernel source tree for building external modules. NOTE: =E2=80=9Cmodules_prepare=E2=80=9D will not build Module.symvers even = if CONFIG_MODVERSIONS is set; therefore, *a full kernel build needs to be executed to make module versioning work.*" So I am just trying to confirm with you whether I have to first build the kernel with like "make" or not? As you can imagine my hardware takes *very* long to build a kernel as I did in my last attempt so I am asking whether it is needed. Hope you understand. Best Regards