From patchwork Mon Jun 29 15:09:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 11631165 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1BAC6618 for ; Mon, 29 Jun 2020 15:27:26 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AA427248F3 for ; Mon, 29 Jun 2020 15:27:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="L5FZEMdu"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="mXEtDj06" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AA427248F3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=+4kvow4JOUwm+U2MMnNhBDVakTIRZdcITXuAnzAYqoo=; b=L5FZEMdubfbWOM/rrd4U+/eET S8YCRf8aNkYuUQLCwN33nH+gkGhtdsINyHR+84V246K3yaMBon6xnIOW2ZlXD+473qTQYDitqfYzs CVz667+QPwNbCp78lXQMxmGUcj5cer2uVUqZWC3i7sru0rY+IBgq5XTUYpn2daHCw1NsDKJB2X/Mg HeUCashwin9de1Ek5wGpHCb3H4ehz0ROBEJez9SIiJVkC8zowAb5rVrya0oLDLv8hYBjLCiHqn4B+ Q5oDW7ug+GZyW4XvU1uNaIxs/33XBzEq9BM9zH/n7Nv0Ez1p/gXgRx+osQvsj34Q5MpVcnaebGJto l2H2xVELA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jpveq-0001XM-Ao; Mon, 29 Jun 2020 15:25:20 +0000 Received: from casper.infradead.org ([90.155.50.34]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jpvQM-0002m5-QJ; Mon, 29 Jun 2020 15:10:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=2YeplEPR04hiBDpZvgwGgQ682Y54MssaO5Sl4bHM92Y=; b=mXEtDj06uwp0XZaPyMoKeE9XTc 4xHtrcRMcXE21TYwIyImI4zkFFpbP+f5zYbYGkvOemOGSf0GpAJcA2ysmW7rw5TJaeCoWS1Ts89PM 97f6MXGloAzPgWUfWMeaiBH2vMyQ6RzIJ8Qs9BgyW5T8qosTmrkQLGaa/aAnL2nQ5PosJRECTHU+r wznzZlu4LG4Qw/H6qTifekLB94iS5DGEGbYPrMFFKKT8MXWYpGKRcUGuCeafp8ybigGXucW3JQfJs 8F3uUwrQ0/opLwFP+Z5kM1FAhZfRkHt0XCBM03H13huCuY9GBbUWizblGjdeOrhQLJlM7agS3DF+g tfdPO35A==; Received: from mx2.suse.de ([195.135.220.15]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jpvQB-0003SC-1m; Mon, 29 Jun 2020 15:10:20 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id D7F48B02B; Mon, 29 Jun 2020 15:10:06 +0000 (UTC) From: Nicolas Saenz Julienne To: gregkh@linuxfoundation.org Subject: [PATCH v2 34/47] staging: vchiq: Unify fourcc definition mechanisms Date: Mon, 29 Jun 2020 17:09:32 +0200 Message-Id: <20200629150945.10720-35-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200629150945.10720-1-nsaenzjulienne@suse.de> References: <20200629150945.10720-1-nsaenzjulienne@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200629_161012_671701_C5630346 X-CRM114-Status: GOOD ( 11.85 ) X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-4.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, kernel-list@raspberrypi.com, linux-kernel@vger.kernel.org, Nicolas Saenz Julienne , laurent.pinchart@ideasonboard.com, linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org There is already enough duplication with regard to fourcc generation in the kernel. Let's at least use the same macro all over the vchiq ecosystem. Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c | 2 +- .../vc04_services/bcm2835-audio/vc_vchi_audioserv_defs.h | 5 ++--- drivers/staging/vc04_services/interface/vchi/vchi.h | 3 --- drivers/staging/vc04_services/vchiq-mmal/mmal-msg.h | 1 - drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c | 2 +- 5 files changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c index 18309578e9a2..55f1e684eef1 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c @@ -125,7 +125,7 @@ vc_vchi_audio_init(struct vchiq_instance *vchiq_instance, struct vchiq_service_params params = { .version = VC_AUDIOSERV_VER, .version_min = VC_AUDIOSERV_MIN_VER, - .fourcc = VC_AUDIO_SERVER_NAME, + .fourcc = VCHIQ_MAKE_FOURCC('A', 'U', 'D', 'S'), .callback = audio_vchi_callback, .userdata = instance, }; diff --git a/drivers/staging/vc04_services/bcm2835-audio/vc_vchi_audioserv_defs.h b/drivers/staging/vc04_services/bcm2835-audio/vc_vchi_audioserv_defs.h index d6401e914ac9..b4fa239c5ebe 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/vc_vchi_audioserv_defs.h +++ b/drivers/staging/vc04_services/bcm2835-audio/vc_vchi_audioserv_defs.h @@ -8,9 +8,8 @@ #define VC_AUDIOSERV_VER 2 /* FourCC codes used for VCHI communication */ -#define VC_AUDIO_SERVER_NAME MAKE_FOURCC("AUDS") -#define VC_AUDIO_WRITE_COOKIE1 MAKE_FOURCC("BCMA") -#define VC_AUDIO_WRITE_COOKIE2 MAKE_FOURCC("DATA") +#define VC_AUDIO_WRITE_COOKIE1 VCHIQ_MAKE_FOURCC('B', 'C', 'M', 'A') +#define VC_AUDIO_WRITE_COOKIE2 VCHIQ_MAKE_FOURCC('D', 'A', 'T', 'A') /* * List of screens that are currently supported diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging/vc04_services/interface/vchi/vchi.h index 59559d4cd5f1..7108c254a38a 100644 --- a/drivers/staging/vc04_services/interface/vchi/vchi.h +++ b/drivers/staging/vc04_services/interface/vchi/vchi.h @@ -8,9 +8,6 @@ * Global defs *****************************************************************************/ -// Macros to manipulate 'FOURCC' values -#define MAKE_FOURCC(x) ((int32_t)((x[0] << 24) | (x[1] << 16) | (x[2] << 8) | x[3])) - // Opaque handle for a VCHIQ instance struct vchiq_instance; diff --git a/drivers/staging/vc04_services/vchiq-mmal/mmal-msg.h b/drivers/staging/vc04_services/vchiq-mmal/mmal-msg.h index 91f9b400d8dc..b636e889c8a1 100644 --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-msg.h +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-msg.h @@ -28,7 +28,6 @@ #define VC_MMAL_VER 15 #define VC_MMAL_MIN_VER 10 -#define VC_MMAL_SERVER_NAME MAKE_FOURCC("mmal") /* max total message size is 512 bytes */ #define MMAL_MSG_MAX_SIZE 512 diff --git a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c index c960fb7ec890..2c5027c1f0bb 100644 --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c @@ -1863,7 +1863,7 @@ int vchiq_mmal_init(struct vchiq_mmal_instance **out_instance) struct vchiq_service_params params = { .version = VC_MMAL_VER, .version_min = VC_MMAL_MIN_VER, - .fourcc = VC_MMAL_SERVER_NAME, + .fourcc = VCHIQ_MAKE_FOURCC('m', 'm', 'a', 'l'), .callback = service_callback, .userdata = NULL, };