Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2046874imm; Thu, 14 Jun 2018 07:59:52 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKXChKK84qkWWNga+3/At/+XLwlbVcviY4QceJMDqFgyeP67xvJ4DOgQIfhcjrTCleN+IFs X-Received: by 2002:a65:64d3:: with SMTP id t19-v6mr2644109pgv.148.1528988392573; Thu, 14 Jun 2018 07:59:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528988392; cv=none; d=google.com; s=arc-20160816; b=N4ZXId4A4vHXct/5dKP7GF2bQwZbDkLIJE4N1qZAzLrXaY3sBTcxNEyl7anYGt+fMa ZT2fD2dYmIn/MRQdVq38NHFCEMo9sY/Ayi1Pi9pwz8Ee3gG8ZYIl1TvpejJk35ufmecR tNfGgxQcqA7IjSiMttzmiaT12NX/9OGdPqbHCA8oT8w+9ujYy8dmV/UEljWL0OK03txb F7Gr19YLOAFCTttlQhJ0WqThW17OSISIrcLYIKxLZ3dPJTb/3+N/h9Sk+h5zgchHE4Z2 /QOpSB+fzOYLywiEAquP9NTr9IipvUU/SjYjjOUYgtv0GyQKi1FVZY01UUMSozVxUh6o jDDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=SNOBCyUARE6WW1CWpylvcyMz/e68kdynillPejlBD6U=; b=tSI7t5xM0xmUk+STwv2X5eiiLos19uAPtY0IERESmxIN5bzEIdUS+ou6NeyU6eJrTB EaABsg3WOk1Fmg3IyFH9uHaIULbinymwR+ZT1gVEfHv03bDdMbPKWvzP8uzswM0WXUFz nHezd9lL7Anb1wWRZglJ9wYI0gxmB5RipWZoBJTXFM06FtBzQg/OBY8AxWEv4YMM2IsV 1NJ9PLHQMY+RA5Kytk4A+Yu5FwkShQP2bzJJjHJiJQR1rdJpekN4ffNDC4gVlvy8kLzx DTp5wKflELiXc2ucId0Fc3VXxHmHOinrHPYN+MF8tg2e5p1zd9RJldeze09qeP1RpmEY dKSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1mYhPRco; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t8-v6si4494802pgq.369.2018.06.14.07.59.37; Thu, 14 Jun 2018 07:59:52 -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=@kernel.org header.s=default header.b=1mYhPRco; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936099AbeFNOFi (ORCPT + 99 others); Thu, 14 Jun 2018 10:05:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:45828 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755252AbeFNOFc (ORCPT ); Thu, 14 Jun 2018 10:05:32 -0400 Received: from jouet.infradead.org (unknown [190.15.121.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5C50F208DD; Thu, 14 Jun 2018 14:05:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1528985131; bh=5jmlrCFWgZFQP/eqFmgI2vEiOT/M79F0AbREkluK2Ow=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=1mYhPRcomXqQ5LqhkLhY9iv6lOb+7BDtg13AoJOmX6/AAXyGZDEfdYPx0UMAvwOpl m55GjIgjp1gMbVhtOPhrtoSg0sY9mca9MbHcLaWHl0Qz8wsOU28DqVbMpQlbR0mUVT whFhUJxUzlH9m165JMj8Ewnc25qskUYLXYIcW9Z0= Received: by jouet.infradead.org (Postfix, from userid 1000) id 1150B146963; Thu, 14 Jun 2018 11:05:29 -0300 (-03) Date: Thu, 14 Jun 2018 11:05:29 -0300 From: Arnaldo Carvalho de Melo To: Thomas Richter Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, jolsa@redhat.com, brueckner@linux.vnet.ibm.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com Subject: Re: [PATCH 1/3] perf alias: Remove trailing newline when reading sysfs files Message-ID: <20180614140528.GE30043@kernel.org> References: <20180614114845.41221-1-tmricht@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180614114845.41221-1-tmricht@linux.ibm.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, Jun 14, 2018 at 01:48:43PM +0200, Thomas Richter escreveu: > Remove a trailing newline when reading sysfs file contents > + /* Remove trailing newline from sysfs file */ > + cp = strrchr(buf, '\n'); > + if (cp) > + *cp = '\0'; > + We have rtrim() - Arnaldo