Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1097061pxb; Fri, 27 Aug 2021 00:49:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyx1f3IkeBNhl1C/6vGlBnJgr76VX8fKo37PCIWpiImiCy8jLRw8xI+HT95PKS/1Bp9Lfr6 X-Received: by 2002:a05:6e02:1d1a:: with SMTP id i26mr5664683ila.96.1630050547566; Fri, 27 Aug 2021 00:49:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630050547; cv=none; d=google.com; s=arc-20160816; b=D16Zvixyt4m2meU6oyPX+P1vwImSRxPqUw37QsFpT/egujQzoTzUDy4CGo8Xfb8lQ9 63xYFI0metpITafAJ/pkV4Cg2vNPaSXVn8a2/a9/CZynoc3y/qxH53/Mme053SlUdpRr vv2M3oJ1jfdnHMuV/X80zGsSll/zJv3UwMU1dUyZfZbLgkX+o1X00Kr+BM1h6f3fsS/5 eAo6ghYBfK5NaouYsOmmq/tGiMzzolvLFoVSkuHauaQ/tSxoOOOOh5tB2q9Z0aTKR35o bf8yOxZUEhfxp7E4Ml+EJLvRUMrNaTc6YuPFkveCW3EZva+20NWFz13rcWrz9GG3cYc5 CFvg== 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:date:subject:to:from :dkim-signature; bh=nvlJRJ69OUHyrUACrpo8F1miQw6oE5JdvcD3B6H2x0I=; b=YMb81peO1Ce4WG8yB+xKjUVyk63KTCe8t5ooWVh5NMDsV9ItEeIRv5WJIsfmhmdZBU OT5EUovPUeDdYwLsqnKTQg4PyoHYY75H6rZHUczpOfQBj0XwQh6W+uGanu9XQLTI0GSd yNg7RWcANMoL4x+hHCL/jacrkjNWj7zQIVFNgu0nHzchfeBuZXKVH41xJncyWH1aubg1 odd75L0zQYFzvUj2Wg7Kv4mM//lCBr2Pxaw+gX6qymv3tZc42LRh7DgKz8qwLt9yM48v Rk2Je1dciMoa9GCZxLSUPMA7KG4OEFlXRxuceKgypPo09ht/RPn4pL4WF/z0ozHTQLW5 5FDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EdkjD9fO; 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 a23si1167423ioh.18.2021.08.27.00.48.54; Fri, 27 Aug 2021 00:49:07 -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=EdkjD9fO; 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 S244438AbhH0Hs5 (ORCPT + 99 others); Fri, 27 Aug 2021 03:48:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244395AbhH0Hsz (ORCPT ); Fri, 27 Aug 2021 03:48:55 -0400 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2CACCC061757 for ; Fri, 27 Aug 2021 00:48:07 -0700 (PDT) Received: by mail-ej1-x62f.google.com with SMTP id i21so12010332ejd.2 for ; Fri, 27 Aug 2021 00:48:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=nvlJRJ69OUHyrUACrpo8F1miQw6oE5JdvcD3B6H2x0I=; b=EdkjD9fOb5h5Ac1wZ/RtDTPYlj3ywQ4mTl2SlK13ldBoX5PXCuYIHWzSzXI06I0I5E 3PgDPD5f8NYmERz01Zrllyff90aH75QLhEyz66a4X2cHsjj48Vo5I6JXPbcceMXDLMTt Gn+oGbziJkTdCKqLL0ua/bdqrS1bqgFFoVFwkkYZ9iYm5D8hVwvYCRydPPbAeOHsxbJN O1zPn9uoU6jl1TuqqHS92lkFe6KUGa9YjqUROV9zgE5RVrhAyXY9Q7d8+CtKlMN4BxXp M3XzIH4MtUi8IL/e1li7qLnf4S7lUzB3Y3AIzjw2WeuTeyyXQxiyoKLU7hYZYsbwFrGB P29g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nvlJRJ69OUHyrUACrpo8F1miQw6oE5JdvcD3B6H2x0I=; b=NjI85QM9QOyIW+bjt1Uum2G2ufx32giCPIXBpuCaHkT/u3ZFSAVCvKUc+KBX/s1ytV V+jxIQYJ/jhjeWbBxNGcIRY8lpz/ToHUup2sfMwVVZRN3xp3yEUNS2IE5y+PYxflNtmm 1jOVfziIqJUZPp/p+DMVYZq22Qhjp/XasKGnfAXuKMdIDi3Brdzru7R73tAEPHoPPddi DWKzeietXs/bBup9ZFr1YmVmASAxjLfc2np8Hh/7pwSaZcGS4+PnzWjkIWMbmzvVzNH3 ZBT6KX47igsEHFte5WCEyw1izT9x08cH0n5H4EU6KYG1XQj4etncYaMW5Vf+7d3pO8Qn g2KQ== X-Gm-Message-State: AOAM531MifGdz85c93a5A0gtMxCsqoxrCmRz9y3+HZXsJ0GmAniyoLBA FACWCdFAHsNugZBuyReB9Jz+fjcJS/o= X-Received: by 2002:a17:906:bfe3:: with SMTP id vr3mr8637018ejb.521.1630050485714; Fri, 27 Aug 2021 00:48:05 -0700 (PDT) Received: from localhost.localdomain (host-79-22-100-164.retail.telecomitalia.it. [79.22.100.164]) by smtp.gmail.com with ESMTPSA id y20sm385604eje.113.2021.08.27.00.48.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Aug 2021 00:48:05 -0700 (PDT) From: "Fabio M. De Francesco" To: linux-staging@lists.linux.dev, Krish Jain , linux-kernel@vger.kernel.org Subject: Re: [PATCH] Declare the file_operations struct as const Date: Fri, 27 Aug 2021 09:48:04 +0200 Message-ID: <1742120.GgyQvu0Ciu@localhost.localdomain> In-Reply-To: <3634721.RBzQ2xsved@localhost.localdomain> References: <3634721.RBzQ2xsved@localhost.localdomain> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday, August 27, 2021 8:49:30 AM CEST Fabio M. De Francesco wrote: > On Friday, August 27, 2021 3:59:28 AM CEST Krish Jain wrote: > > From: Krish Jain > > > > Declare the file_operations struct as const as done elsewhere in the > > kernel, as there are no modifications to its fields. > > > > Signed-off-by: Krish Jain > > --- > > [] > Are you sure that it works? I wouldn't be. > You didn't build this file. Please build your changes before submitting patches. > > Furthermore, please always rebase to the current version of the staging tree. > > Finally, please use the class modifier "static" as the first keyword of a declaration/definition > as it is done everywhere in the kernel (see "grep -rn "static const" drivers/staging/" and > then switch to "const static" and read the output). Please don't misunderstand me: as far as I can see this is your first patch and (I'm pretty sure I can speak for everyone else about this) you are very welcome to staging and to kernel hacking :) However, before posting further works, you'd better read at least the following documents: https://www.kernel.org/doc/html/latest/process/4.Coding.html https://www.kernel.org/doc/html/latest/process/submitting-patches.html And please don't forget to always CC linux-kernel@vger.kernel.org. Have a nice time with kernel hacking. Thanks, Fabio