Received: by 10.192.165.156 with SMTP id m28csp1242571imm; Mon, 16 Apr 2018 17:11:23 -0700 (PDT) X-Google-Smtp-Source: AIpwx48Q+kg37ro6cAYwWIlrmdqUe4r6VFPyrRnEMYMk60aFL2qsK/uwfRzry/xKu8Xy3ZDXRBQ6 X-Received: by 10.98.53.198 with SMTP id c189mr4425308pfa.243.1523923883028; Mon, 16 Apr 2018 17:11:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523923882; cv=none; d=google.com; s=arc-20160816; b=zVgnYuqnikRH9AB748exbOeJI3h3eKlnXP2YPKMhAUBoFUN3GzF4xW4lunRkeBWImW isYX2J1d5Ty9YvqybqN8WOmyb3baq9ffQyxN7voX4HT5p7akpRS4vo58/7RpI4i/Fqpm 5YgCM0tDPCLeUcvNHqoxa5KOCuvIlBqY4QiiQafeAXuRfvtd8YOC80hbsAvryVZ0WHOm FB7pCcQPfTgpTZKh9PS5AqAcQSbN82/o4Qg3b5K35GEw02pMEANSofosKRFTeNC4gQCx lKpT6M5QTUgGWSGbjejjDItgW2C4Jordr5b7/vexbnaNuW9fOTjElndb6aXn1KWIWSbW 7FJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=jT9PlTvAusk/0xL5pXYGiXFBdl+4EjjNp/GFaRiCMLU=; b=YfEd7M8mxkGNWy6NqdnXGo6pdx+xGvTyG4ufeu0/TqQEeSHp25gB3P/lQYM2sBCsFh 9srC6CxWyBD2zge22yiBrl2Knan6vqnbY+niy/TWJ0kREuUjkRnGWdwmRwbjl/OxdLI8 X9dwN5vmbqj9wgH5TS5CM6zo7kWxtqkJadk+nslBN3srLyLIuLIuhZsjYrzae6PjDEiL rDRZVknHZNDaHUDZJPYx3bE8xRyLhlmslcBW53aYjqUTX2rkiul6YpUF2HhXXfSIJaY8 sCeu/0FajsZOasaOo0V541CwvSpWAyKTJesduKRlBBwAWYTvBUcmXWq8JspxggP32CZe tAeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=W1soGIRp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w6si10231594pgp.496.2018.04.16.17.10.56; Mon, 16 Apr 2018 17:11:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=W1soGIRp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751205AbeDQAJI (ORCPT + 99 others); Mon, 16 Apr 2018 20:09:08 -0400 Received: from mail-ot0-f196.google.com ([74.125.82.196]:33688 "EHLO mail-ot0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751060AbeDQAJG (ORCPT ); Mon, 16 Apr 2018 20:09:06 -0400 Received: by mail-ot0-f196.google.com with SMTP id g23-v6so4335727oti.0 for ; Mon, 16 Apr 2018 17:09:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jT9PlTvAusk/0xL5pXYGiXFBdl+4EjjNp/GFaRiCMLU=; b=W1soGIRpD8kGatcNpVlsXuJHXD3JIAT15INklRl71nlI14cVTqON7vx9t+rrtOvz78 xYrDHrZzg4K5fRwcixYDtEzZbUN2RRFzNlxCwTn4/AqgrjuJSNmw43mGTg92xiBCdy/0 xPknK2aOM0tUMVkRK2pn9/JdauLCNciNu6PwM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jT9PlTvAusk/0xL5pXYGiXFBdl+4EjjNp/GFaRiCMLU=; b=jL8E2j4qlgNKWsq7oxa8QfL1YBOXu76gPnTyhLFheb4VqBkPhvQy4KB7ELOGQOZZ4j FB5kniMewtlrBJGVZY55IOrmZYVkKkB94W9ORBB9jHVn+hfIUy/qV6y6dMIEhb05lav9 DbUxfIaBnKVGRmBagskxU5Vonmm3IWJljgFuux1NDO/rpY6PbVLMwE/6CoD/IdPSlemI sWVjxp/4/xZKkDx5xVEiaWmWwZdYJTL8QxBMUxguj3syH+7ptuGOU7Ip8NcMNDoeIyV9 8+59YkQRC0YDqPvL8A0VQEaHg6lT2TXn5DjXqm66Ge1pz8RS168wZrGq1554JfcUfNsU zlWQ== X-Gm-Message-State: ALQs6tBj1NsXzvd//8yCTzmVDnro1nzSHbk93konaq1ghNwFOWg8FqCS k4QLxdeTIhCNF7MzqtMO7DGqaZRCzbo= X-Received: by 2002:a9d:5262:: with SMTP id q34-v6mr10872794otg.67.1523923745808; Mon, 16 Apr 2018 17:09:05 -0700 (PDT) Received: from mail-oi0-f51.google.com (mail-oi0-f51.google.com. [209.85.218.51]) by smtp.gmail.com with ESMTPSA id w93-v6sm8534228ota.67.2018.04.16.17.09.03 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Apr 2018 17:09:04 -0700 (PDT) Received: by mail-oi0-f51.google.com with SMTP id h11-v6so6973188oic.3 for ; Mon, 16 Apr 2018 17:09:03 -0700 (PDT) X-Received: by 2002:aca:b3d6:: with SMTP id c205-v6mr14872588oif.266.1523923742820; Mon, 16 Apr 2018 17:09:02 -0700 (PDT) MIME-Version: 1.0 References: <20180412224111.35216-1-swboyd@chromium.org> In-Reply-To: <20180412224111.35216-1-swboyd@chromium.org> From: Evan Green Date: Tue, 17 Apr 2018 00:08:27 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] soc: qcom: cmd-db: Make endian-agnostic To: swboyd@chromium.org Cc: Andy Gross , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-kernel@vger.kernel.org, msivasub@codeaurora.org, Lina Iyer , Bjorn Andersson Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 12, 2018 at 3:41 PM Stephen Boyd wrote: > This driver deals with memory that is stored in little-endian format. > Update the structures with the proper little-endian types and then > do the proper conversions when reading the fields. Note that we compare > the ids with a memcmp() because we already pad out the string 'id' field > to exactly 8 bytes with the strncpy() onto the stack. > Cc: Mahesh Sivasubramanian > Cc: Lina Iyer > Cc: Bjorn Andersson > Cc: Evan Green > Signed-off-by: Stephen Boyd > --- > Changes from inline patch: > * Fixed magic > * Made function for memcmp() > * > drivers/soc/qcom/cmd-db.c | 116 +++++++++++++++++++++----------------- > 1 file changed, 65 insertions(+), 51 deletions(-) > Sent by a computer through tubes Reviewed-by: Evan Green