Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp261862ybe; Mon, 2 Sep 2019 00:51:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqyMA42rFrsp8kc1rPe7/KQbk8FM/kf66skfaDCCsCCKl8P27Qvw8evsJJBhKeGfF6h+nrGj X-Received: by 2002:a63:2043:: with SMTP id r3mr8593990pgm.311.1567410708947; Mon, 02 Sep 2019 00:51:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567410708; cv=none; d=google.com; s=arc-20160816; b=IZdjFu6bBe6gh21JEGIwGshQEF53ALr1TZJM0HByxMt8MRap0DsNFm6bnOThZGwOp0 lzAtNYI5tiYdX5QGN5UmQ0b9L+VjZfhOEQoHCtD4ksqPropLeQcaBtpBVu6RSsPrNey4 jhlvGVLqlNOL9e2Ym9auC+nMcGq0WsRL7WTKvfF0Dka6Ok27fhQaqjuQpVBWu1jKmTNA HbmSDEy5LNRiyL69xYLZq7MSyL7HpK64+Jf9SQT+4FIdDoCGtaS6HWSrqwARivh0+MBm ds9pGornXrgnRiWIxIVl5aKFvFiOptBOb0fE7IAxHOz8ixv9dlKGpyebsMNXfX8XTWH/ FbVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=kcqdyPLZCov8q1Yc/4XKH+CQy/J5UB53PgtIuV1/9s0=; b=yzLHPznLMEq62zfAItW29zBLBFMLe6spzvGQcjSSB+BZZM8oYPe+ITOqFThNWQqbLt KjcUzr8PkFDT9e9SH9AibFDdxr94v/dmY2I4PtJ1xEza/eIbtu0Ey5YPwLUnUlhMCp5A uvaAN8AkobZxncBRraBmvrG/PxEiOvpqlLqfSCJcJik32w1OGxINVt3QWkccG85qivJU HEhPqFRy/hTqX42s0Xbl7wX6uOMgAfnmD9VQCe5UyV9/3NBl6LKAeUW+jNshHDGI2uT5 S1QxYVJhOVbsnpzwNdohdD1srr3NGFO6xkjw7cfm5QAA9mtgOgcyaqbjyHY1Ldp+x/ZS ra7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LcnZfCKV; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l98si11221844plb.157.2019.09.02.00.51.33; Mon, 02 Sep 2019 00:51:48 -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=@gmail.com header.s=20161025 header.b=LcnZfCKV; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729926AbfIBHub (ORCPT + 99 others); Mon, 2 Sep 2019 03:50:31 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:51138 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729396AbfIBHub (ORCPT ); Mon, 2 Sep 2019 03:50:31 -0400 Received: by mail-wm1-f67.google.com with SMTP id c10so1473880wmc.0 for ; Mon, 02 Sep 2019 00:50:29 -0700 (PDT) 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; bh=kcqdyPLZCov8q1Yc/4XKH+CQy/J5UB53PgtIuV1/9s0=; b=LcnZfCKVTpLMDSyTKoyPJioZnyoyxbApYpDcFohtdhF/N0yZ6NvcquB62kSyksYfiU RTJqnqILmxGftbwaKpi9NjKjvcrsskfRVgfbzUqeTCK8SzVVB/ao54259cpxN1ChkJuC Wj2iIBBzAOsDDASBRonvIl1Dt4WA9re47EEAklCsTF30eqGvz+mg1Uz3pcFqj/oYZI/n FCiEsDN10RupFNICm0sQ3c49zv40v4/c1J8M+C/GMtpT9gwgvend9KwyhAZ0Jme8s8C+ bwTdZCBseNxE6MQ7qvG+M3q59N2HZZ6tG2fpZCrSsPIyKvGqdl2uQdqjEdj+owb/QA3f EGrQ== 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; bh=kcqdyPLZCov8q1Yc/4XKH+CQy/J5UB53PgtIuV1/9s0=; b=cv+LSPtnhyf1St0ho+thkIEU476+C9Q6d9B2/Nz0jdN2XQfPajOq3pxc//cNTpyRFe nfvbc7S8+k34pBOkV66AlTQPsM+lp8HPWwih6Dkemo2cH0XBxq5VtujiQDaY5sWm85TO WBFWZRF0+cN2TMo+zeKkvUG1JsNN51FjkWKvpBHfQhh5JyMzjqRnnuudlddhz75JSRtZ c6gSh0QR3vlpLYs5Z1GglBYrUp+5o9TS1BfrzobzQ4Cst24L/XI5jj4QbgtW5dZNHj2h WyLDv2lLwM2pOAiikNMdqEHrW9fLhuHK9B0yIgrpYmKx+ozgpXZiWkNKYVCGp8ODbNJe yDOw== X-Gm-Message-State: APjAAAVGMq7zpus9IV715cNv9qHTkoN9u4l+7c/Iead9EQlspRQlasBj Fr7p6PEPV7y4sHlckLjfgHP7G5Vb X-Received: by 2002:a1c:2bc1:: with SMTP id r184mr8601187wmr.40.1567410628597; Mon, 02 Sep 2019 00:50:28 -0700 (PDT) Received: from ogabbay-VM.habana-labs.com ([31.154.190.6]) by smtp.gmail.com with ESMTPSA id f6sm27460510wrh.30.2019.09.02.00.50.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Sep 2019 00:50:28 -0700 (PDT) From: Oded Gabbay To: linux-kernel@vger.kernel.org, oshpigelman@habana.ai, ttayar@habana.ai Cc: gregkh@linuxfoundation.org Subject: [PATCH 2/2] habanalabs: show correct id in error print Date: Mon, 2 Sep 2019 10:50:24 +0300 Message-Id: <20190902075024.27302-2-oded.gabbay@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190902075024.27302-1-oded.gabbay@gmail.com> References: <20190902075024.27302-1-oded.gabbay@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If the initialization of a device failed, the driver prints an error message with the id of the device. The device index on the file system is that id divided by 2. Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/misc/habanalabs/device.c b/drivers/misc/habanalabs/device.c index bc98032cc4ec..e9f5a0e45183 100644 --- a/drivers/misc/habanalabs/device.c +++ b/drivers/misc/habanalabs/device.c @@ -1290,10 +1290,10 @@ int hl_device_init(struct hl_device *hdev, struct class *hclass) if (hdev->pdev) dev_err(&hdev->pdev->dev, "Failed to initialize hl%d. Device is NOT usable !\n", - hdev->id); + hdev->id / 2); else pr_err("Failed to initialize hl%d. Device is NOT usable !\n", - hdev->id); + hdev->id / 2); return rc; } -- 2.17.1