From patchwork Thu Mar 23 09:08:54 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: 13185292 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 A0B20C6FD1D for ; Thu, 23 Mar 2023 09:09:26 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.513690.795068 (Exim 4.92) (envelope-from ) id 1pfGwX-0004iU-3T; Thu, 23 Mar 2023 09:09:09 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 513690.795068; Thu, 23 Mar 2023 09:09:09 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pfGwW-0004iN-Ub; Thu, 23 Mar 2023 09:09:08 +0000 Received: by outflank-mailman (input) for mailman id 513690; Thu, 23 Mar 2023 09:09:07 +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 1pfGwV-0004eG-Io for xen-devel@lists.xenproject.org; Thu, 23 Mar 2023 09:09:07 +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 5a7a3c6e-c95a-11ed-b464-930f4c7d94ae; Thu, 23 Mar 2023 10:09:03 +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 A45AD5BF35; Thu, 23 Mar 2023 09:09:01 +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 9F74D13596; Thu, 23 Mar 2023 09:09:01 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id z7SVJS0XHGT9OwAAMHmgww (envelope-from ); Thu, 23 Mar 2023 09:09:01 +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: 5a7a3c6e-c95a-11ed-b464-930f4c7d94ae DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1679562541; 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=uxRmcjJb2cS7ZT5n5WQ4reqwUztrWOhzU1vzO1C7A6Q=; b=cL5Eg0U818v6l8QaHGzKrm412D7RfkQWCFckmMgV6hpoWzdRACm8HcKmtNn+72anUxytep hOMc6nxsyIH6Kh4+z7fT9/5TpSIJXKiOJLEjmapwXQwqmLZagv6TlUcozK/c99QHy6EEes HK141F7KFJwPRgLojXfqwUdh8h6fHig= From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Jan Beulich , Andrew Cooper , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Wei Liu , Anthony PERARD , Julien Grall Subject: [PATCH v5 0/5] tools: use xen-tools/libs.h for common definitions Date: Thu, 23 Mar 2023 10:08:54 +0100 Message-Id: <20230323090859.25240-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 V5: - swap patches 1 and 2 in order to avoid build error Juergen Gross (5): tools: get rid of additional min() and max() definitions tools: add container_of() macro to xen-tools/common-macros.h 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 | 5 +++++ 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, 14 insertions(+), 49 deletions(-)