Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp40905imj; Fri, 8 Feb 2019 14:32:52 -0800 (PST) X-Google-Smtp-Source: AHgI3IZhYWn8cByiLNiufheYqcpMy2ZL0E5X6G/HeK4c/xffNAk24GYzB9tRwxSyshutltp/DWGE X-Received: by 2002:a65:46cf:: with SMTP id n15mr8177109pgr.187.1549665172598; Fri, 08 Feb 2019 14:32:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549665172; cv=none; d=google.com; s=arc-20160816; b=qk3bUQveC/h6yQ6rbZytBNx2o2xUcY+lME6F/HZ5TRqkptXf6SeHQz8FGPO1qcdNU0 cUj4MF2o6JWX8+z3Ap4+KOJdAZBn32IQZfFlwp1J+XpP2Vf0bfS23EyyXPuOAqcT6vnA jzNomV3gfzHRHFxcU7Z6wEz5B7yIyUXvDCEXAzDf2slaQOFILDHRv71W1RPVNwMrdzjH HHJfeq8aBNNAO/WUfto0capoYr9RSpDeVP3epeIFbDHQFV/PGvZ0TfeAVe6myMjv4wEZ OKiij0vPB4lJ9f9jZT7ZT2ieMExFzBW6Mp9pabbJqacs1THT/DeImYyvztAfENEWwjBU VLHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=4MmHhrZCWwf0Jj5r3oFevIAVOPwXt80Sip+HsREXIZ4=; b=BLzLJ3NMKXqW/mLZFyBB02/QrR9dvseuj5bENMMwQpUihu9374djGRBxaWY0M2TOii Dxw4+1HyMGRbohje76cT+eUA23jymPRzO8GGDrAJblNPDZZADxeWIw9UC8zALiGWyzFE 634xMhs3Jg2UJXnDVm9okDOOZU2e/JdnzsJL3b3/uUzYmSM7FYpB2rSItCwffLa1qhgH jSTDNFwPNxIrq5WuYgTS005JhWE3fGlFWOoin+N0Z3Uc5sXbCVjEkLaMD/gXJlMLceG6 hdZAke4f/S0YaWUXHZXR2NOfLft+rR3ullxihdONGv5g1LNqceBxseYLTmU1RNrhsZQR ZmGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=N5r8+FgD; 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 x15si3363448pgq.378.2019.02.08.14.32.36; Fri, 08 Feb 2019 14:32:52 -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; dkim=pass header.i=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=N5r8+FgD; 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 S1727059AbfBHWcQ (ORCPT + 99 others); Fri, 8 Feb 2019 17:32:16 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:43141 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726788AbfBHWcQ (ORCPT ); Fri, 8 Feb 2019 17:32:16 -0500 Received: by mail-pl1-f196.google.com with SMTP id f90so2109173plb.10 for ; Fri, 08 Feb 2019 14:32:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4MmHhrZCWwf0Jj5r3oFevIAVOPwXt80Sip+HsREXIZ4=; b=N5r8+FgDBOm7C2HUHTNnWDzMEI0dVoqLf+amRiv8hZLSUErnKYrK5NfT4KaVhX3cI+ +nZjfY0Gkq8DAUsUSVBekEk/dBcyauLDUL0l9l3NmpcqIsBQm1YpMxU3olDyLuJ9PGoa VWruqA6cZgDn3POeESbgrGLj+rl5LRFsu9EiMZBYTrM/YRnCLRBjdqUfjCUO4wgIoi/x DlSUfPvFVdrurKv3+f10m+zOsejeGDwpTD46SmdFgkijWiuT2qwKuig06Ihhd8EU+7Nl kYZwtWgJwZub1Axm3b8/hO3lBzeh6TkIzcyOtULmnUl/2YjH1az8EQ/RFcOlPk30vhVc LCyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4MmHhrZCWwf0Jj5r3oFevIAVOPwXt80Sip+HsREXIZ4=; b=Ew9QKCSAF7cVY9cIsI4FA5xSX8BX2MQQp0SEvYhbGwC9QGDQ3dmFRjjEmkXUqZY85U mwHT4w8iInLEET0nIhADcG6wWvk2i05nwfLkssZUvPUMCLTn6K5uI/6sB7q8PkqAVQNS KRlJDINMCKxtIVMlJ3WvtYN77sqfifCktHdjZLcx2I7fo23Yt1tw+KVfB7dheYV/NHA7 82e8doFhMqon/I3LFtubiTo3GBoQn/6RIjAHML3HmM8sOjttrPvttDBQkqLnvr/yYsjW pGcNz80kByiceg7GPZVgxa5VrP+jrc776ahMT23nWod3fPLCYJnpgMlEzYHxdMGo95k1 TIsw== X-Gm-Message-State: AHQUAuZD3KPWQpStkhrereLk9zoRJU7ekSu2IKvKKIxJ0szqXt5f9fuf 6iBViGS+5SF/V0nU9btFQO2QoQ== X-Received: by 2002:a17:902:128c:: with SMTP id g12mr24307583pla.146.1549665135950; Fri, 08 Feb 2019 14:32:15 -0800 (PST) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id n10sm4992076pfj.14.2019.02.08.14.32.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 Feb 2019 14:32:15 -0800 (PST) Date: Fri, 8 Feb 2019 14:32:09 -0800 From: Stephen Hemminger To: Kimberly Brown Cc: Michael Kelley , Long Li , Sasha Levin , Dexuan Cui , devel@linuxdriverproject.org, Haiyang Zhang , linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] Drivers: hv: vmbus: Display nothing in sysfs if monitor_allocated not set Message-ID: <20190208143148.052c8d9c@hermes.lan> In-Reply-To: <52d58fe5805f2ba2405c9091b4c86033d434d2b9.1549619051.git.kimbrownkd@gmail.com> References: <52d58fe5805f2ba2405c9091b4c86033d434d2b9.1549619051.git.kimbrownkd@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 8 Feb 2019 05:01:12 -0500 Kimberly Brown wrote: You are right, the current behavior is broken. It would be good to add a description of under what conditions monitor is not used. Is this some part of a project emulating Hyper-V? > + > + if (!hv_dev->channel->offermsg.monitor_allocated) > + return sprintf(buf, "\n"); If monitor is not used, why not return an error instead of empty data. Any program (or user) would have to handle that already.