From patchwork Mon Nov 18 05:03:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 179578 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp2401324ilf; Sun, 17 Nov 2019 21:04:56 -0800 (PST) X-Google-Smtp-Source: APXvYqxrP0Ee6/NV9iNaK4naN9hzfwq4qtFWXlCkobq8dH4KcSJ7MZn8YZA/70yuWTSE4oJ1VU4K X-Received: by 2002:a62:2cd7:: with SMTP id s206mr31613498pfs.106.1574053495913; Sun, 17 Nov 2019 21:04:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574053495; cv=none; d=google.com; s=arc-20160816; b=iAra30waFOfxSs4TnyxA++mwvBLjLE/KzjXjrGi5bWjwtHyTwoG0iV6VgT07/4Migo OlW4f9lA9n1l/UpAEzAtp/ZfWOpFiqwyTIlvejyq4mowULXRQNZSuvRDpbvMo4Co2WUF W76FfOB5V/glmdj74TqVnXrWP5SkDMrw/GskyBCpQNue+qhmzN6KPEnuueCt1hKq0sfL Ex9RLyaji1dicT1wojSyLE99sxY0wpIILmyL0AhMjgsf/Kr6+z8bAUQf/Ek8I58zWOSQ TX5HX+f2M3yeqd6JuKefZvGujnuK3lE0Xs3uJ65SoSw9dpaxyZsdT+AKXRbNLN49OkKI 7Kkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:delivered-to; bh=m6DeXjgH61jEyKcg0Y1qT9s2jkpjy/kDIM1WEqjP2bo=; b=VrVMmxZDLKAKQXvnwgdGDjmMjiGmh/nC+2GIt1TQC/8z2hEQrWuTCUgm7p6XrxbAXP SLTGMn6sza8DwaCcD1a7E6IMGGfAlJgZ/XtSVFgV3JWsxbHXyA/QOykO4udmeUhTDqpm 0tCNt81IkaZMmBSfYSiFJGL6aUKnnnjR24YB042eUCCi+21KFIaF820Mi/8WtmAg0i9O cuTK879vTKQ4hPN9FKyyp8Ud4PjPmbNO75+h3oUKk8jPPp1NofWLaEqxH0Qnr9qIrr+B wWfjs+fnOkvtmvTZMmuMvC8mjPmtCOXJMbZE+0wryKQemfiyQNCG1z9Yh1J+gHHrZnts rmBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=j52i5Q8S; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id 136si6356741pgg.91.2019.11.17.21.04.55; Sun, 17 Nov 2019 21:04:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=j52i5Q8S; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 8DC6C7F8C2; Mon, 18 Nov 2019 05:04:52 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by mail.openembedded.org (Postfix) with ESMTP id 9E7447F699 for ; Mon, 18 Nov 2019 05:04:06 +0000 (UTC) Received: by mail-pj1-f50.google.com with SMTP id f7so1117495pjw.5 for ; Sun, 17 Nov 2019 21:04:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jS7eOaMY19S2i32JPKviCii1qq3euas8FzD2sxosSFM=; b=j52i5Q8Sfq4pcv6YE7N35vGist/D/S0ZHJ52MB5Myce0IdfO4UgJjHevF0i2NhoJxP 4vbSg3f98+EzyClCBd4y2txso5sihiJOJiAh/p8CELvASq9Hfu6SBTSoWUxRsNi0hp6w bSlorqTIXb6Y/Kn40XCFXcOqUicUwwtrIIT+wzFg+XPwhK2bx+es2sZnCoddhR5Wx2k2 CHVdPW1uyNXDmzOH9AeJbehsH4aXEf6I/jZMOPHxJUuUDvMzKJmIQx+vIVKJ+z7GI0M4 HFoBv81Dna+G9C+GCaRPDe0AzgZj5EjfMe91jsuEU70wcbYhS9585iFQf/0lsqC5G6P7 KuKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jS7eOaMY19S2i32JPKviCii1qq3euas8FzD2sxosSFM=; b=WVJ/oYdySA6k9X5iJUumDYrZYWIK0GwEMF5dCceMWlNAHVSSNCHx8WixHyYEInKPNR 8GFZ1dXHDzqmOkwQGY1nLYmplOswVJ2UaDIS2nDbU6q31/MdauXxgctraiv/SJESmxIb nFfJlAFedjIGfbnGuvSKxALa4nPzXCpeS+rHDDyGZOGO3/1pv5OwiDK6aqaYB+ZUtdtM vrgp2R64RQtUIxb12mE5xnLATvZEXE2fQqjH+tuXmhR+TRLozqN1nUIiA1ktR2Z1e2W5 I7DOfmpD/a7uVw3kX7MOvDVI2wuJa4GtvqTyT3yQtW9RBQddIwqElfPs2OdMhsgLc2bV Nj8Q== X-Gm-Message-State: APjAAAWXMlmTC3wvGLgVduhw/Tch7FwcbqIpcCuyOjLDIo32Zd8owAuF rvfSjKje3jLNcy2z5jwBqktZ2Jnywkc= X-Received: by 2002:a17:90a:ae01:: with SMTP id t1mr37438041pjq.32.1574053447061; Sun, 17 Nov 2019 21:04:07 -0800 (PST) Received: from apollo.hsd1.ca.comcast.net ([2601:646:8500:1c20::30e8]) by smtp.gmail.com with ESMTPSA id y6sm16881131pfm.12.2019.11.17.21.04.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Nov 2019 21:04:06 -0800 (PST) From: Khem Raj To: openembedded-devel@lists.openembedded.org Date: Sun, 17 Nov 2019 21:03:49 -0800 Message-Id: <20191118050352.1379153-2-raj.khem@gmail.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191118050352.1379153-1-raj.khem@gmail.com> References: <20191118050352.1379153-1-raj.khem@gmail.com> MIME-Version: 1.0 Subject: [oe] [meta-oe][PATCH 2/5] libkcapi: Move static inline functions where used X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org Clang warns about unused functions on some arches e.g. mips unused function '_bswap32' [-Werror,-Wunused-function] Signed-off-by: Khem Raj --- .../0001-kcapi-kdf-Move-code-to-fix.patch | 67 +++++++++++++++++++ .../recipes-crypto/libkcapi/libkcapi_git.bb | 1 + 2 files changed, 68 insertions(+) create mode 100644 meta-oe/recipes-crypto/libkcapi/libkcapi/0001-kcapi-kdf-Move-code-to-fix.patch -- 2.24.0 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel diff --git a/meta-oe/recipes-crypto/libkcapi/libkcapi/0001-kcapi-kdf-Move-code-to-fix.patch b/meta-oe/recipes-crypto/libkcapi/libkcapi/0001-kcapi-kdf-Move-code-to-fix.patch new file mode 100644 index 0000000000..3801207ed9 --- /dev/null +++ b/meta-oe/recipes-crypto/libkcapi/libkcapi/0001-kcapi-kdf-Move-code-to-fix.patch @@ -0,0 +1,67 @@ +From bf6c816ef61240a1dbbbf6f2a7b2a5ad5f846461 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 16 Nov 2019 23:03:51 -0800 +Subject: [PATCH] kcapi-kdf: Move code to fix + +Fixes clang build +unused function '_bswap32' [-Werror,-Wunused-function] + +Upstream-Status: Submitted [https://github.com/smuellerDD/libkcapi/pull/83] +Signed-off-by: Khem Raj +--- + lib/kcapi-kdf.c | 32 +++++++++++++++++--------------- + 1 file changed, 17 insertions(+), 15 deletions(-) + +diff --git a/lib/kcapi-kdf.c b/lib/kcapi-kdf.c +index ea39846..49c2d88 100644 +--- a/lib/kcapi-kdf.c ++++ b/lib/kcapi-kdf.c +@@ -54,21 +54,6 @@ + #include "kcapi.h" + #include "internal.h" + +-static inline uint32_t rol32(uint32_t x, int n) +-{ +- return ( (x << (n&(32-1))) | (x >> ((32-n)&(32-1))) ); +-} +- +-static inline uint32_t ror32(uint32_t x, int n) +-{ +- return ( (x >> (n&(32-1))) | (x << ((32-n)&(32-1))) ); +-} +- +-static inline uint32_t _bswap32(uint32_t x) +-{ +- return ((rol32(x, 8) & 0x00ff00ffL) | (ror32(x, 8) & 0xff00ff00L)); +-} +- + #define GCC_VERSION (__GNUC__ * 10000 \ + + __GNUC_MINOR__ * 100 \ + + __GNUC_PATCHLEVEL__) +@@ -86,6 +71,23 @@ static inline uint32_t _bswap32(uint32_t x) + #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ + # define be_bswap32(x) ((uint32_t)(x)) + #elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ ++ ++static inline uint32_t rol32(uint32_t x, int n) ++{ ++ return ( (x << (n&(32-1))) | (x >> ((32-n)&(32-1))) ); ++} ++ ++static inline uint32_t ror32(uint32_t x, int n) ++{ ++ return ( (x >> (n&(32-1))) | (x << ((32-n)&(32-1))) ); ++} ++ ++ ++static inline uint32_t _bswap32(uint32_t x) ++{ ++ return ((rol32(x, 8) & 0x00ff00ffL) | (ror32(x, 8) & 0xff00ff00L)); ++} ++ + # define be_bswap32(x) _swap32(x) + #else + #error "Endianess not defined" +-- +2.24.0 + diff --git a/meta-oe/recipes-crypto/libkcapi/libkcapi_git.bb b/meta-oe/recipes-crypto/libkcapi/libkcapi_git.bb index 799070972a..aa438e5859 100644 --- a/meta-oe/recipes-crypto/libkcapi/libkcapi_git.bb +++ b/meta-oe/recipes-crypto/libkcapi/libkcapi_git.bb @@ -10,6 +10,7 @@ SRCREV = "5649050d201856bf06c8738b5d2aa1710c86ac2f" PV = "1.1.5" SRC_URI = " \ git://github.com/smuellerDD/libkcapi.git \ + file://0001-kcapi-kdf-Move-code-to-fix.patch \ " inherit autotools