From patchwork Fri Oct 6 10:02:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konstantin Aladyshev X-Patchwork-Id: 13411229 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D6E5814A98 for ; Fri, 6 Oct 2023 10:02:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ef0R/znv" Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C39FD6; Fri, 6 Oct 2023 03:02:24 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-5045cb9c091so2562036e87.3; Fri, 06 Oct 2023 03:02:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696586542; x=1697191342; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YUX/UAbHIqbeqOjhPaMPY2ZesCBPS6XxII45ueUUUxU=; b=ef0R/znvz3elA2Z4601Ks/oieeC58Yj7zcI0rBLZgH52X/Uziwr3HKjuZr8y2zTZk/ K8WgbBfe8kTNImjBlylmtDTi44mbgXTTFpfzq9c+81MPT+gkYF+fBIV0+vAL0O+GXEXr cpbkJjINZfXt2vJ3eu0e0bQVbjWjAwAgego1BZIP0zooPiBCnn8StxDZhwix+RFLO6wW /gA6AGJ10anFI9wbk33EqPH8TpSPpD3JukBdzg1bUMxB6fYoCif4IeEaKF7p0CrVJ2Dy Bs+k7kx+aw1X+VE9Tqt2aFybKan39gAj/82jqeB8k3+1wQZdLKgLonU+LTjxKpaLzvX8 z2Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696586542; x=1697191342; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YUX/UAbHIqbeqOjhPaMPY2ZesCBPS6XxII45ueUUUxU=; b=FYelmPhzNIv+ZKgKKVS65fAsxeZVZ0vNR59VE6cspYAehDBKmAi1yhvUTJy5oRqLJT tFHQNdPkBfZGiPROR83gmhXi8oKoroXUU/g97Qve3CPka2UzCoSyzoGClvbn2byarcqu H06xfst9nmcPTxBywl+vJoYRYZ8qeI+T0yN1qFBsReBNyiePUtcm99Zale9GU4HP+v0T ljt2LZyIswOvJ4F4eJYy3+mpAv5nJ+t3QLLFw5WuJpa4HfZSG2LtgLg4PG6o9dMQ1Af8 lCT26wYROmcvqb+x4WdCO3G8PxGdERAFwjq8BJAsLtkYG3q9xb4LKWlGPSMDYzeWWKqU wOwg== X-Gm-Message-State: AOJu0Ywqjh67Q+YBoAEWXaQDxes1nnS+qPBDX77d4KQs2Sxdy3KrGM47 naTWrSAsMFo0lquGuufwRck= X-Google-Smtp-Source: AGHT+IFjrzT7dsTckMv9vrji9YO0ch4tOuJBrePWI1iOFYJBSSCiTqAdVoJYQCbiuwXpZ76ptkaXnw== X-Received: by 2002:a2e:8445:0:b0:2c0:3186:8efa with SMTP id u5-20020a2e8445000000b002c031868efamr5697429ljh.11.1696586542330; Fri, 06 Oct 2023 03:02:22 -0700 (PDT) Received: from PC10319.67 ([82.97.198.254]) by smtp.googlemail.com with ESMTPSA id x12-20020a2e9dcc000000b002bcedacd726sm713674ljj.25.2023.10.06.03.02.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 03:02:21 -0700 (PDT) From: Konstantin Aladyshev To: Cc: minyard@acm.org, joel@jms.id.au, andrew@aj.id.au, avifishman70@gmail.com, tmaimon77@gmail.com, tali.perry1@gmail.com, venture@google.com, yuenn@google.com, benjaminfair@google.com, aladyshev22@gmail.com, jk@codeconstruct.com.au, matt@codeconstruct.com.au, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, openipmi-developer@lists.sourceforge.net, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, openbmc@lists.ozlabs.org, netdev@vger.kernel.org Subject: [PATCH v4 1/3] ipmi: Move KCS headers to common include folder Date: Fri, 6 Oct 2023 13:02:12 +0300 Message-Id: <20231006100214.396-2-aladyshev22@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231006100214.396-1-aladyshev22@gmail.com> References: <20231006100214.396-1-aladyshev22@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,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 The current KCS header files can be utilized by both IPMI drivers (drivers/char/ipmi) and MCTP driver (drivers/net/mctp). To be able to use them in both cases move the headers to 'include/linux' folder. Signed-off-by: Konstantin Aladyshev --- drivers/char/ipmi/kcs_bmc.c | 8 +++----- drivers/char/ipmi/kcs_bmc_aspeed.c | 3 +-- drivers/char/ipmi/kcs_bmc_cdev_ipmi.c | 2 +- drivers/char/ipmi/kcs_bmc_npcm7xx.c | 2 +- drivers/char/ipmi/kcs_bmc_serio.c | 2 +- {drivers/char/ipmi => include/linux}/kcs_bmc.h | 0 {drivers/char/ipmi => include/linux}/kcs_bmc_client.h | 3 +-- {drivers/char/ipmi => include/linux}/kcs_bmc_device.h | 3 +-- 8 files changed, 9 insertions(+), 14 deletions(-) rename {drivers/char/ipmi => include/linux}/kcs_bmc.h (100%) rename {drivers/char/ipmi => include/linux}/kcs_bmc_client.h (97%) rename {drivers/char/ipmi => include/linux}/kcs_bmc_device.h (96%) diff --git a/drivers/char/ipmi/kcs_bmc.c b/drivers/char/ipmi/kcs_bmc.c index 8b1161d5194a..d29a8505d6ed 100644 --- a/drivers/char/ipmi/kcs_bmc.c +++ b/drivers/char/ipmi/kcs_bmc.c @@ -5,15 +5,13 @@ */ #include +#include +#include +#include #include #include #include -#include "kcs_bmc.h" - -/* Implement both the device and client interfaces here */ -#include "kcs_bmc_device.h" -#include "kcs_bmc_client.h" /* Record registered devices and drivers */ static DEFINE_MUTEX(kcs_bmc_lock); diff --git a/drivers/char/ipmi/kcs_bmc_aspeed.c b/drivers/char/ipmi/kcs_bmc_aspeed.c index 72640da55380..3dc0dfb448f5 100644 --- a/drivers/char/ipmi/kcs_bmc_aspeed.c +++ b/drivers/char/ipmi/kcs_bmc_aspeed.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -21,8 +22,6 @@ #include #include -#include "kcs_bmc_device.h" - #define DEVICE_NAME "ast-kcs-bmc" diff --git a/drivers/char/ipmi/kcs_bmc_cdev_ipmi.c b/drivers/char/ipmi/kcs_bmc_cdev_ipmi.c index cf670e891966..bf1001130a6c 100644 --- a/drivers/char/ipmi/kcs_bmc_cdev_ipmi.c +++ b/drivers/char/ipmi/kcs_bmc_cdev_ipmi.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -17,7 +18,6 @@ #include #include -#include "kcs_bmc_client.h" /* Different phases of the KCS BMC module. * KCS_PHASE_IDLE: diff --git a/drivers/char/ipmi/kcs_bmc_npcm7xx.c b/drivers/char/ipmi/kcs_bmc_npcm7xx.c index 7961fec56476..160553248a93 100644 --- a/drivers/char/ipmi/kcs_bmc_npcm7xx.c +++ b/drivers/char/ipmi/kcs_bmc_npcm7xx.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -17,7 +18,6 @@ #include #include -#include "kcs_bmc_device.h" #define DEVICE_NAME "npcm-kcs-bmc" #define KCS_CHANNEL_MAX 3 diff --git a/drivers/char/ipmi/kcs_bmc_serio.c b/drivers/char/ipmi/kcs_bmc_serio.c index 1793358be782..24df7144a189 100644 --- a/drivers/char/ipmi/kcs_bmc_serio.c +++ b/drivers/char/ipmi/kcs_bmc_serio.c @@ -5,12 +5,12 @@ #include #include #include +#include #include #include #include #include -#include "kcs_bmc_client.h" struct kcs_bmc_serio { struct list_head entry; diff --git a/drivers/char/ipmi/kcs_bmc.h b/include/linux/kcs_bmc.h similarity index 100% rename from drivers/char/ipmi/kcs_bmc.h rename to include/linux/kcs_bmc.h diff --git a/drivers/char/ipmi/kcs_bmc_client.h b/include/linux/kcs_bmc_client.h similarity index 97% rename from drivers/char/ipmi/kcs_bmc_client.h rename to include/linux/kcs_bmc_client.h index 6fdcde0a7169..f6350c9366dd 100644 --- a/drivers/char/ipmi/kcs_bmc_client.h +++ b/include/linux/kcs_bmc_client.h @@ -5,8 +5,7 @@ #define __KCS_BMC_CONSUMER_H__ #include - -#include "kcs_bmc.h" +#include struct kcs_bmc_driver_ops { int (*add_device)(struct kcs_bmc_device *kcs_bmc); diff --git a/drivers/char/ipmi/kcs_bmc_device.h b/include/linux/kcs_bmc_device.h similarity index 96% rename from drivers/char/ipmi/kcs_bmc_device.h rename to include/linux/kcs_bmc_device.h index 17c572f25c54..65333b68c0af 100644 --- a/drivers/char/ipmi/kcs_bmc_device.h +++ b/include/linux/kcs_bmc_device.h @@ -5,8 +5,7 @@ #define __KCS_BMC_DEVICE_H__ #include - -#include "kcs_bmc.h" +#include struct kcs_bmc_device_ops { void (*irq_mask_update)(struct kcs_bmc_device *kcs_bmc, u8 mask, u8 enable);