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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 69442C77B75 for ; Mon, 22 May 2023 12:24:24 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 36BE484701; Mon, 22 May 2023 14:24:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="alXzzb2V"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C2301847CC; Mon, 22 May 2023 14:23:07 +0200 (CEST) Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 563E3846E4 for ; Mon, 22 May 2023 14:23:02 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jens.wiklander@linaro.org Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-4f4b2bc1565so788964e87.2 for ; Mon, 22 May 2023 05:23:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684758181; x=1687350181; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=cUJaXRMKrJZfSuo4O6oHzmU/rUOVfjL2sH+Txpo7XaI=; b=alXzzb2V8vmbFWjROTmWQUXQA/rCquA21gy8kDMqQN1ISRu4R5nnerb7sYZb6M5xsj TCxA4XIo/7ejgwENQENVbtSVC0aVuL+2Odc/Stx63GdRiCtECWJHS78Mr+bY81BJ4Mta reOLAVeLtngYe+cRN2d6qglyy1WXjAARhQHUwAuzJpzExUxWde5KRJqu7iJQ09H+GkF7 Ecfabmweku5HeardZEMImRIPnmLGcD88dLOCzUQRr8/2an6a60JBIj5uLYKRpNqXWYW5 rlvdYw47JtpEtlYmui20fJ22ewvKsWJxOAz/wva7lzhMvE3f6gt+lD+vjvTCbteRuEu+ bs4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684758181; x=1687350181; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=cUJaXRMKrJZfSuo4O6oHzmU/rUOVfjL2sH+Txpo7XaI=; b=XOl5yDGsioxNGjV6akM3R6W/HBEqkOQfsOCiEGgWpctdsDZz3JFt1rjC0r+XraEdjW Ol8Bfalj7HgxA9qDrZxYQA78/OEepf0xgZOgOvLcJ7lCuw7WuEwp1oprRBacYXEJjOG5 ISqOw73IqM7HOP71FRLke7M2K7PWRHgf8Ed9q41spN8H0XAQb398IaemGdl8M9YJRuFP xErgeXYKAP82oY658ZlLFzSlyRbbw4Swh/uMF/zJ90tVO73Pe1KkEQXjHFJBj5kaiKPM u4KA5Fpe3dLMA+1FdKE4K+qVohZIsAHDtxkqeO1R3D2eZqD/1z2QxSddCKAQZmm0eBAf CfqQ== X-Gm-Message-State: AC+VfDwRJuRlvQ9EZ8vQo23/bgDhQB2BuZWCAEux7eMI/hhWBP6kluS3 VcswRgNXfXmeSL77pn4TUdzqYXuhXjlM30Hk+uI= X-Google-Smtp-Source: ACHHUZ4c/EF4pEY/c1jvx/7JM/1UA+HULM+i+GCXQ4VVh8LOcI27LmwnjJiFxcGTV8jx2kKStYCvOA== X-Received: by 2002:ac2:4c14:0:b0:4f0:81c:73eb with SMTP id t20-20020ac24c14000000b004f0081c73ebmr3500821lfq.42.1684758181304; Mon, 22 May 2023 05:23:01 -0700 (PDT) Received: from rayden.urgonet (h-46-59-78-111.A175.priv.bahnhof.se. [46.59.78.111]) by smtp.gmail.com with ESMTPSA id y9-20020ac24469000000b004efe8174586sm974633lfl.126.2023.05.22.05.23.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 May 2023 05:23:00 -0700 (PDT) From: Jens Wiklander To: u-boot@lists.denx.de, linux-btrfs@vger.kernel.org Cc: Ilias Apalodimas , Arnd Bergmann , Huan Wang , Angelo Dureghello , Daniel Schwierzeck , Wolfgang Denk , Marek Vasut , Nobuhiro Iwamatsu , Marek Behun , Qu Wenruo , Tom Rini , Jens Wiklander Subject: [PATCH 0/8] Cleanup unaligned access macros Date: Mon, 22 May 2023 14:22:30 +0200 Message-Id: <20230522122238.4191762-1-jens.wiklander@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Hi, There are two versions of get/set_unaligned, get_unaligned_be64, put_unaligned_le64 etc in U-Boot causing confusion (and bugs). In this patch-set, I'm trying to fix that with a single unified version of the access macros to be used across all archs. This work is inspired by similar changes in this Linux kernel by Arnd Bergman, https://lore.kernel.org/lkml/20210514100106.3404011-1-arnd@kernel.org/ Thanks, Jens Jens Wiklander (8): arm: use asm-generic/unaligned.h sh: use asm-generic/unaligned.h mips: use asm-generic/unaligned.h m68k: use asm-generic/unaligned.h powerpc: use asm-generic/unaligned.h fs/btrfs: use asm/unaligned.h linux/unaligned: remove unused access_ok.h asm-generic: simplify unaligned.h arch/arm/include/asm/unaligned.h | 21 +------ arch/m68k/include/asm/unaligned.h | 17 +----- arch/mips/include/asm/unaligned.h | 23 +------ arch/powerpc/include/asm/unaligned.h | 18 +----- arch/sh/include/asm/unaligned.h | 22 +------ fs/btrfs/crypto/hash.c | 2 +- include/asm-generic/unaligned.h | 89 +++++++++++++++++++++++----- include/linux/unaligned/access_ok.h | 66 --------------------- 8 files changed, 83 insertions(+), 175 deletions(-) delete mode 100644 include/linux/unaligned/access_ok.h -- 2.34.1