Received: by 10.223.185.116 with SMTP id b49csp7316040wrg; Thu, 1 Mar 2018 03:37:33 -0800 (PST) X-Google-Smtp-Source: AG47ELs+KQJee+o+BjM2AGDTIo6qy6XpNNCCbsj474lBXiiPEZ/Bx9dwKxRNt4dTJKyEh4H8lwkL X-Received: by 2002:a17:902:8c93:: with SMTP id t19-v6mr1658710plo.304.1519904253721; Thu, 01 Mar 2018 03:37:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519904253; cv=none; d=google.com; s=arc-20160816; b=vZ38MB8f6sy0Z5Gbzv8Pg+nBR9cKNg4O2dA7CRqXMywh3EMT4logRGd6Zaf0idbDlj Lh31hueeauW4iuu5FkgOltE78rhr8RjK3siLmqa2B5lGfDZxysocsjdN3CNPOufkS5YP S2zxNw7PNVvi96tAfXhgDj+Hrb3Js2wm/8WNwVy5sy601G66qmCpHaP1RkpBHRtF4Uo8 oXvZjMo6S+tyu6sXfvQxUGlsE3m9rwFlvp/PvAcKSgdqhiE4wEDu5a/SX73BGFVq45rt 0iCooMrg5OhqemmGP1y8Zhp3CRc7NZx3tb+a6WgBm+9W8FK95ZfS6B4PdSxSHY/+0tYD nSOQ== 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 :references:in-reply-to:mime-version:arc-authentication-results; bh=j2nILrni9Izc9yCqWPX8NZWC1e1S+uFiimC+ObwJFyA=; b=F54UnlNxHrerpL+0HPbE6Nre2CXvdwbfTsMR5Ph/zSYUm8x9Z672ej5n20/g8rfzzo hrXF76+Pt+mzeDa7B9tHQFv5rlNtOJFUvfl3vrBLlnXou6hlUu982A2pFrPG/xVgpDy0 Loi7LGwg23TlZYEczObzDH4orqMSFWcDPj6Di0lSad9vVT1IWszMj1GaS3dns1PQpZt2 zzAZkRiVDNC1OZn5B+AytgrQL8f8GETtS6T7jo7fAoiZEkEQwLgq8RgT9tdd7M+b3mmB 2MMPwM+S2RdkEtcIaV/02ry0SRJix0bd12ReUfHBnOs8RzqLJZ26X2eV0njCFLwmbx0r NLWQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t10-v6si2896581ply.373.2018.03.01.03.37.19; Thu, 01 Mar 2018 03:37:33 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967796AbeCALgg (ORCPT + 99 others); Thu, 1 Mar 2018 06:36:36 -0500 Received: from mail-qk0-f195.google.com ([209.85.220.195]:42693 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967540AbeCALgb (ORCPT ); Thu, 1 Mar 2018 06:36:31 -0500 Received: by mail-qk0-f195.google.com with SMTP id b130so7032741qkg.9 for ; Thu, 01 Mar 2018 03:36:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=j2nILrni9Izc9yCqWPX8NZWC1e1S+uFiimC+ObwJFyA=; b=WgOfRXsdNTkIppmNAewPpxnAyIVSISIZGOwIoAV2RvVu8/7piSIrtu0b1PKl3Hgvn8 sANIDIhXw7k5FbaIEI4gmczj0JuI+lr50ro5ywOOewlvYv5kiHGH169gImRFlWjvrbIY Wkwec3Dm2nlW3Kzx0ncAakOm/PvST3AUVzECRsQs6zkrxkXEy3DGKP0KRU3TkHJkGFlC an71Jp5VyxMf/o8y51doJs2/DoitmgTE5+0dSBaqBJTDRxU0JC3ETpSs2qpfGpBuk5O0 i0M8BwRqTU6b2LKDqf8gPXKUEwze7q68gKE1zxuLB5qTpe9PmFimetiuUN9iyBpMtLuS UxiQ== X-Gm-Message-State: AElRT7HDWMmW0rDw+LM184zAdFdIAfawNZD9dWob3xkDXoT1a603u1Tm 983eZPxvGNQCw6BFHcdv3Wnvf415RzKb00O4UGOv0g== X-Received: by 10.55.171.21 with SMTP id u21mr2082677qke.331.1519904190227; Thu, 01 Mar 2018 03:36:30 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.137.194 with HTTP; Thu, 1 Mar 2018 03:36:29 -0800 (PST) In-Reply-To: <20180228193142-mutt-send-email-mst@kernel.org> References: <20180228150615.17317-1-marcandre.lureau@redhat.com> <20180228150615.17317-7-marcandre.lureau@redhat.com> <20180228193142-mutt-send-email-mst@kernel.org> From: =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= Date: Thu, 1 Mar 2018 12:36:29 +0100 Message-ID: Subject: Re: [PATCH v16 06/11] fw_cfg: handle fw_cfg_read_blob() error To: "Michael S. Tsirkin" Cc: Linux Kernel Mailing List , Arnd Bergmann , Baoquan He , Sergio Lopez Pascual , "Somlo, Gabriel" , xiaolong.ye@intel.com 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 Hi On Wed, Feb 28, 2018 at 6:32 PM, Michael S. Tsirkin wrote: >> @@ -557,7 +566,10 @@ static int fw_cfg_sysfs_probe(struct platform_device *pdev) >> goto err_probe; >> >> /* get revision number, add matching top-level attribute */ >> - fw_cfg_read_blob(FW_CFG_ID, &rev, 0, sizeof(rev)); >> + err = fw_cfg_read_blob(FW_CFG_ID, &rev, 0, sizeof(rev)); >> + if (err < 0) >> + goto err_probe; >> + >> fw_cfg_rev = le32_to_cpu(rev); >> err = sysfs_create_file(fw_cfg_top_ko, &fw_cfg_rev_attr.attr); >> if (err) > > So on this one, maybe we should just drop this attribute. > Does anyone use it? > Removing it will speed up boot slightly. We can't skip reading FW_CFG_ID (rev) as we need it to check DMA support. I don't mind if we remove the sysfs entry, but I doubt it makes a difference in boot time. >> -- >> 2.16.1.73.g5832b7e9f2