Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1230117pxb; Thu, 4 Feb 2021 07:59:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJxDjSPDMAuri7is2K/8OAtU7oi2wwHklZbN9wFI74U98QzwVcBfhj4loL4h9BrY3vU7X4NS X-Received: by 2002:a05:6402:1249:: with SMTP id l9mr8155107edw.375.1612454341373; Thu, 04 Feb 2021 07:59:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612454341; cv=none; d=google.com; s=arc-20160816; b=1GjG6qimk3ius7awY4fNmvWa3aZcZrqBJe2cmu6btB65VSClV5eL8vtCLk2Yf6MghM aX0ATVVarQLPMsH2bJbCE4lLjB/9z+xmI1ODuxdA53btv8FFkwsDuQ2kEEUZArqI/o1E QcWnJll8HmAwG/qPstXniFVZ07lepTM5wweMbzKlzhpU0CR4LkEWADc7OVVY6oJzcJV5 wK1nSPWxg3YXn5m+ERsQSS6yMj7S7PgPDa0/zQmommQbXErCJK8gjv+2ZEvHUUjNXlp2 xXR8od3T5LiW+cmsvkVKIGdyZuCh9gInjkFOCDZZNmPCJYH+2aN9xJATcU6g/Y+zb+Je pDbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=IK+MRCOQOIne3k9uEr/GFkjvkWpN0hYO4yLZKBFcxYA=; b=xH54M7vRDX6x6U0AGdr6l8G5oaXqYXjBli0D1vGx90CShdfNwEv/SDsSNqXS22YQyT kr5Bx9GOFo7BvVQE/MsDsOpxkVpSY2jbpmjJH1ubAUqn1rTek6kJL00DF0ddYbP1kvcI 6hHFudoR9WnEnmU4qxxOXdJ1KsOK1uZ2SRMtFy1JmmBUSJHLr3Liu2AQoM16SfmHoNYH wzimOsb4Hr+YCoRJQmczOQ/UUc2VK+gqgBsHUYe6EdBzt88x5GVa95wMqIeGtoRobf8h xI1L+U+jBvqFVxuPtSIub/t3h24kufQ8mFuGWn8TyvLeoBuBAhitaK5QrdLVknfoazRU ZM9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WCloZaO1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r11si1745712edh.225.2021.02.04.07.58.36; Thu, 04 Feb 2021 07:59:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WCloZaO1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237544AbhBDPzA (ORCPT + 99 others); Thu, 4 Feb 2021 10:55:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:36196 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237642AbhBDPyJ (ORCPT ); Thu, 4 Feb 2021 10:54:09 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 47C0864DA5; Thu, 4 Feb 2021 15:53:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612454007; bh=khs2i3o7OyLpByS4iRQitlaOIeP18Lqtszz7MVd7WSg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WCloZaO1gq9wEGgNOGoPV0d87TreZLfRu/7f/MA26tyjU+Ru6yMj8HTvUKCtqwpcB gJYP+dBHnNpx5QLBd+YZP1KhLVoLcZXgluQoewwozQsn565g4vIkH/nF8HYlt9bSJm /6K6Lg3RKKon6YUux3/YZCd2Zmfl3rm4eW2dNlOe5XdDsqTq+EIewXbyPr9wxBoyD1 X0XfE6f2ptOHJxzzfkkfdAjICiuDOCfTKXijzCDMRS0+s+SGlm/KPhzsbakn+x6/5b 5/5TU0WdJ/OBkqCnd/nZnsDrUmD713Pg3Mh2l2uzXFksuvJtb1nNwCKBKGUnZoviA1 SAM0go1xxT0jw== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 2F5C140513; Thu, 4 Feb 2021 12:53:24 -0300 (-03) Date: Thu, 4 Feb 2021 12:53:24 -0300 From: Arnaldo Carvalho de Melo To: Jiri Olsa Cc: Jiri Olsa , lkml , Peter Zijlstra , Ingo Molnar , Mark Rutland , Namhyung Kim , Alexander Shishkin , Michael Petlan , Ian Rogers , Stephane Eranian , Alexei Budankov Subject: Re: [PATCH 04/24] perf daemon: Add server socket support Message-ID: <20210204155324.GC910119@kernel.org> References: <20210129134855.195810-1-jolsa@redhat.com> <20210130234856.271282-1-jolsa@kernel.org> <20210130234856.271282-5-jolsa@kernel.org> <20210203210423.GQ854763@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, Feb 04, 2021 at 03:49:36PM +0100, Jiri Olsa escreveu: > On Wed, Feb 03, 2021 at 06:04:23PM -0300, Arnaldo Carvalho de Melo wrote: > > Em Sun, Jan 31, 2021 at 12:48:36AM +0100, Jiri Olsa escreveu: > > > +static int setup_server_socket(struct daemon *daemon) > > > +{ > > > + struct sockaddr_un addr; > > > + char path[100]; > > > + int fd; > > > + > > > + fd = socket(AF_UNIX, SOCK_STREAM, 0); > > > > Minor, combine decl with use, since line isn't long and its one after > > the other, i.e.: > > > > int fd = socket(AF_UNIX, SOCK_STREAM, 0); > > hum, sure, but I'm missing the point.. I think it's less readable one line instead of three :-) > > > > > + if (fd < 0) { > > > + fprintf(stderr, "socket: %s\n", strerror(errno)); > > > + return -1; - Arnaldo