Received: by 10.223.185.116 with SMTP id b49csp7425838wrg; Thu, 1 Mar 2018 05:28:37 -0800 (PST) X-Google-Smtp-Source: AG47ELv/+vTzkYCvoZba/jKbF9sy7bzdNK9Ydqyj4++imA1imlVRJIOOFpZvlB5jKWLZKp6/YJxB X-Received: by 10.98.182.26 with SMTP id j26mr1932294pff.223.1519910917320; Thu, 01 Mar 2018 05:28:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519910917; cv=none; d=google.com; s=arc-20160816; b=a8HUWCPgY+Ap42bSZRz1wFAmpIowg/DUaIE0zwG08H2CJgqTf5yuql0UNsA23GXW/h YKXZ3qX3rD7JodoCWg6mSZjrw2c9KrMBtdesZJuOt/sTYCS2BSKrJyRU02F1hw94fFx+ 3ddFjQN9kUOgGRNBW+rN50LFzTbrl7pS2pDsLxA/bxV7VZ+MaXwcPE4SdxZNA6QfhzP4 tQ+rX+kxPz3z4EbOEH6U+HmOnZNCirxnIuci2jFq02GdMv6yhqccz11dnRESz1fKm4IL hJ186PwiW6W1fTy3P5GVRMF+f/IozsRPTUqGfGc2O6IO9LREQimzVuy3dpMILjonQ3UY VdMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=0qdsg34s7T4xU2SHhxeeZYCett9fKUwuN0vbdvJeuHI=; b=r3ZJVxKG0aK1qCZka6xPWzpWkyLtkfCYuxepNC6l0XI0oOayg5Qfw274ny47IzQ+Ro cb/Gpjfv6BIFVXNhGPgQ8NpyuhPEXHPscncWdD7NZvX9BoZy2bgk82nYi/pqOSQT2ZZR hH8ke8hiFds7mHkhTVVdy8u0XXy68tbGt1zp/hM17z9LWC7Ft8SDr3wVVeWS/fzNZLIN pJllSsaPnLL+9EMcRY+M2X60NbGjeJK4k8FObj0x356crEfhoSP05rDcYwEe41W3gyDG rVjZg9AD9IpF6cdWsvZ+RIRHS9gngJYsKb+x5mSIb3vdwpiyuyrdAmR0aCLWSBaDl5Bs DInw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k8-v6si3021978pli.490.2018.03.01.05.28.22; Thu, 01 Mar 2018 05:28:37 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030711AbeCAN1O (ORCPT + 99 others); Thu, 1 Mar 2018 08:27:14 -0500 Received: from mx-rz-1.rrze.uni-erlangen.de ([131.188.11.20]:48251 "EHLO mx-rz-1.rrze.uni-erlangen.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030379AbeCAN1K (ORCPT ); Thu, 1 Mar 2018 08:27:10 -0500 Received: from mx-rz-1.rrze.uni-erlangen.de (mx-rz-1.rrze.uni-erlangen.de [IPv6:2001:638:a000:1025::14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx-rz-1.rrze.uni-erlangen.de (Postfix) with ESMTPS id 3zsYBN3tlLz8spv; Thu, 1 Mar 2018 14:27:08 +0100 (CET) Authentication-Results: mx-rz-1.rrze.uni-erlangen.de; dkim=none reason="no signature"; dkim-adsp=none (unprotected policy); dkim-atps=neutral X-Virus-Scanned: amavisd-new at boeck1.rrze.uni-erlangen.de (RRZE) X-RRZE-Flag: Not-Spam X-RRZE-Submit-IP: 217.238.5.165 Received: from fau.de (pD9EE05A5.dip0.t-ipconnect.de [217.238.5.165]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: U2FsdGVkX1/6UNNSHnSukgpLyJwORBAznkTu/P5mx4g=) by smtp-auth.uni-erlangen.de (Postfix) with ESMTPSA id 3zsYBK0TJHz8sdP; Thu, 1 Mar 2018 14:27:04 +0100 (CET) From: Jonas Rabenstein To: Jonas Rabenstein , Scott Bauer , Jonathan Derrick , Jens Axboe Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH][RESEND] block: sed-opal: fix u64 short atom length Date: Thu, 1 Mar 2018 14:27:00 +0100 Message-Id: <20180301132700.1279-1-jonas.rabenstein@studium.uni-erlangen.de> X-Mailer: git-send-email 2.16.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The length must be given as bytes and not as 4 bit tuples. Signed-off-by: Jonas Rabenstein --- block/sed-opal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/sed-opal.c b/block/sed-opal.c index 36842bfa572e..d5f565e1557a 100644 --- a/block/sed-opal.c +++ b/block/sed-opal.c @@ -562,7 +562,7 @@ static void add_token_u64(int *err, struct opal_dev *cmd, u64 number) } msb = fls(number); - len = DIV_ROUND_UP(msb, 4); + len = DIV_ROUND_UP(msb, 8); if (cmd->pos >= IO_BUFFER_LENGTH - len - 1) { pr_debug("Error adding u64: end of buffer.\n"); -- 2.13.6