Message ID | a2de79b3de30fe70c457953af935dadd49441f00.1670069909.git.christophe.jaillet@wanadoo.fr |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1336464wrr; Sat, 3 Dec 2022 04:24:17 -0800 (PST) X-Google-Smtp-Source: AA0mqf7YYBaBxunBzPwcY6IM90keDW5Ha/pkVV/kKmCCrMBIgos7mPU4Ubr+lEPLj3/FMrixQZBh X-Received: by 2002:a05:6402:10c3:b0:468:4c9a:7c6c with SMTP id p3-20020a05640210c300b004684c9a7c6cmr65627930edu.397.1670070257315; Sat, 03 Dec 2022 04:24:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670070257; cv=none; d=google.com; s=arc-20160816; b=yZFpDn3/44NMmr4U/tZwgllDb6wIKvOrEbypbd7ofWHEyVziL3LQRnQkj/paNE9oLC +FIJuy4+E6sMEo2YeCwovZ5OPPDE8MoiOpRdvthRcZ8EjtNKxYOl5HTXMUoXK3AQ8926 TbQ9udGHSjiMaXKs8BYsq1Tchswk0FhESWRxZv/Tdi2x4wseUm0a5LUsOEQixEgoTaed 0l5YKOkuD35U9bhRrwfWCsKJwxm8wZeCrKGWSjMYVjuPcTl9siswC1swvuoQAzHPep+Y /9eh6GXbNisQ9zimOufPg3WSr1KdfP0ZqBibpXlCmYn9tPE6KMGVNtg7QX5Gz88mGibH FCHA== 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 :message-id:date:subject:cc:to:from; bh=RFhqtA2Tpp15pX0jGMguf+/q0E9oAoT4u4QsOUj9JR0=; b=ScFjhBaGnelEKqqwl+jdPu0+K4tiJjmbcejya1wszJRSDo1kN7YsoXMA/PJV+tcmX+ K72NYLx0c0FO4ZDFJbUqQ1NRMUhw5Dgl1ao7oh8IcDQGVr6kPtHGS0uxMjFGCh2kxzLu VB9X+Py5g/gFOOFVw+U13yszJ640cFjcAb6p08LtlJg6tM3LGnP2ghpKGqkR03V92rME Q43BMY2Sk+hxY687OuNVeI6XVoo8Bk1SX2nrXTZyGjRoR4X8m38zhQvTDUTe2I7Q/xOJ wlOKnb5cZyFmGw3AbmTx0faYlpIoJ4mB92LFPz2Gz/YA45cYqWoDhgKDlMzhieaOnglJ li3Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s11-20020a170906a18b00b007317ad1f9a4si3055077ejy.310.2022.12.03.04.23.53; Sat, 03 Dec 2022 04:24:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229636AbiLCMTH (ORCPT <rfc822;lhua1029@gmail.com> + 99 others); Sat, 3 Dec 2022 07:19:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229623AbiLCMTD (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 3 Dec 2022 07:19:03 -0500 Received: from smtp.smtpout.orange.fr (smtp-28.smtpout.orange.fr [80.12.242.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11F2C1D0FD for <linux-kernel@vger.kernel.org>; Sat, 3 Dec 2022 04:18:59 -0800 (PST) Received: from pop-os.home ([86.243.100.34]) by smtp.orange.fr with ESMTPA id 1RTspiirkpJKl1RTtpLW6C; Sat, 03 Dec 2022 13:18:58 +0100 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sat, 03 Dec 2022 13:18:58 +0100 X-ME-IP: 86.243.100.34 From: Christophe JAILLET <christophe.jaillet@wanadoo.fr> To: Jonathan Derrick <jonathan.derrick@linux.dev> Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET <christophe.jaillet@wanadoo.fr>, linux-block@vger.kernel.org Subject: [PATCH] block: sed-opal: Don't include <linux/kernel.h> Date: Sat, 3 Dec 2022 13:18:49 +0100 Message-Id: <a2de79b3de30fe70c457953af935dadd49441f00.1670069909.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751195590146643469?= X-GMAIL-MSGID: =?utf-8?q?1751195590146643469?= |
Series |
block: sed-opal: Don't include <linux/kernel.h>
|
|
Commit Message
Christophe JAILLET
Dec. 3, 2022, 12:18 p.m. UTC
There is no need to include <linux/kernel.h> here.
Prefer the less invasive <linux/types.h> and <linux/compiler_types.h>
which are needed in this .h file itself.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
Let see if build-bots agree with me!
---
include/linux/sed-opal.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Comments
On Sat, Dec 03, 2022 at 01:18:49PM +0100, Christophe JAILLET wrote: > #include <uapi/linux/sed-opal.h> > -#include <linux/kernel.h> > + > +#include <linux/compiler_types.h> /* for __user */ Not sure we really need the comment here, we don't comment on the other includes either. Also why the added empty line?
Le 05/12/2022 à 08:10, Christoph Hellwig a écrit : > On Sat, Dec 03, 2022 at 01:18:49PM +0100, Christophe JAILLET wrote: >> #include <uapi/linux/sed-opal.h> >> -#include <linux/kernel.h> >> + >> +#include <linux/compiler_types.h> /* for __user */ > > Not sure we really need the comment here, we don't comment on the > other includes either. Also why the added empty line? > Ok for the comment, I'll remove it. In header files, sometimes, when not obvious, we find such comments. Sometimes we don't. For the empty line, it was mostly a matter of taste. My goal was to explicitly show that one was <uapi/linux, and the other one only <linux/ I'll remove it as well. My main point, was only to remove kernel.h. CJ
diff --git a/include/linux/sed-opal.h b/include/linux/sed-opal.h index 6f837bb6c715..87f981c70894 100644 --- a/include/linux/sed-opal.h +++ b/include/linux/sed-opal.h @@ -11,7 +11,9 @@ #define LINUX_OPAL_H #include <uapi/linux/sed-opal.h> -#include <linux/kernel.h> + +#include <linux/compiler_types.h> /* for __user */ +#include <linux/types.h> struct opal_dev;