From patchwork Wed Mar 22 12:08:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?SsO8cmdlbiBHcm/Dnw==?= X-Patchwork-Id: 13183996 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 19A35C6FD1F for ; Wed, 22 Mar 2023 12:09:15 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.513368.794229 (Exim 4.92) (envelope-from ) id 1pexGu-0008K2-CC; Wed, 22 Mar 2023 12:08:52 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 513368.794229; Wed, 22 Mar 2023 12:08:52 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pexGu-0008Jv-6v; Wed, 22 Mar 2023 12:08:52 +0000 Received: by outflank-mailman (input) for mailman id 513368; Wed, 22 Mar 2023 12:08:50 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pexGs-0008Jp-67 for xen-devel@lists.xenproject.org; Wed, 22 Mar 2023 12:08:50 +0000 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 4cf1da5d-c8aa-11ed-b464-930f4c7d94ae; Wed, 22 Mar 2023 13:08:48 +0100 (CET) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 7E71220D4C; Wed, 22 Mar 2023 12:08:47 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 3C15313416; Wed, 22 Mar 2023 12:08:47 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id bI48Dc/vGmT3TgAAMHmgww (envelope-from ); Wed, 22 Mar 2023 12:08:47 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 4cf1da5d-c8aa-11ed-b464-930f4c7d94ae DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1679486927; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=TbUT4bS/1mAf5l0t4bx2e5I2vKmdIgrz1+HOUskmE+o=; b=lYn0Eo9Dj5BPojXK2vUSs4omZJ6TMUYweNllHrzRYccu0NA5yCV2982Q7NIL5/H5tlqJEF Sb67vEtibE0RaF6QnlfTNYpBlgw/gC1H17d+WxS1d2z1VF4mND6STf2yTOHUv88yWG3Wgw wwT2W71uUxfjzvUleQZ0A1785Fe6pZU= From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Wei Liu , Anthony PERARD , Jan Beulich , Andrew Cooper , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Julien Grall Subject: [PATCH v4 0/5] tools: use xen-tools/libs.h for common definitions Date: Wed, 22 Mar 2023 13:08:39 +0100 Message-Id: <20230322120844.19657-1-jgross@suse.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 There are some macros defined multiple times in tools. Use only a single header file for defining those macros and drop the copies, or use stddef.h for offsetof(). V2: - add patch 1 (Andrew Cooper) V3: - address comments V4: - patch 1 of V3 already applied - new patches 3-5 Juergen Gross (5): tools: add container_of() macro to xen-tools/common-macros.h tools: get rid of additional min() and max() definitions tools/hvmloader: remove private offsetof() definition tools/libfsimage: remove private offsetof() definition tools/libs/vchan: remove private offsetof() definition tools/firmware/hvmloader/util.h | 11 ++--------- tools/include/xen-tools/common-macros.h | 4 ++++ tools/libfsimage/xfs/fsys_xfs.c | 4 +--- tools/libs/vchan/init.c | 8 ++------ tools/tests/vpci/Makefile | 2 +- tools/tests/vpci/emul.h | 22 +--------------------- tools/tests/x86_emulator/x86-emulate.h | 5 ----- tools/xenstore/list.h | 6 ++---- 8 files changed, 13 insertions(+), 49 deletions(-)