Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp507080pxj; Wed, 2 Jun 2021 04:54:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkz5W01dLjbMkJYLRa/Y70cdlfnr8MWj2cNJJbJSO7vMTfbL8cYAbeWjnXpfb0Bstc1tYV X-Received: by 2002:a05:6402:424c:: with SMTP id g12mr38299576edb.145.1622634861899; Wed, 02 Jun 2021 04:54:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622634861; cv=none; d=google.com; s=arc-20160816; b=XhZfibIpA47ard51lC+DSM7UAI+sUWurmLLSXGUBAP7NitBmHgwCWO4UsYe8fVn27H VE1Frf+fL9ddgwuCjkdOWit0Z2qg+RVPOUdN56xu3HINSIlu0wUdHbP/Dd3T7sqwibm3 LuB4TbuVyZgUrOzhXSZ1CMj+75zWYTMjMDsqW3C/aAmXT0yaztKpAupwTMbhVNrSCtFm 2iF7NfNplXI2SBCvuE2JyPhJ+KQ9NCbKE6MY48ztLw8uJ7GoNYsTVtaiFSLwkKdkoaa0 wowW2v6GJuafzzmkYkOuxVyVnmY54wjZang6GNxBS6q/JiBdKIfrZNVnohYuDUyfUzbi jAvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature; bh=G01wiBaLKBgH8SUhvu9oGDvUb9DEe5X1aND1gEIw1Uw=; b=bE+2px6NxhCuYPyraEs7MxKXFSX8g5wcWRVA/7A5qt0BtW0K9GdsgiqD3X6H6V1JH4 VmApD9imumLsW46/OGp+tb55X9yT9CsOWlG87cipCbGtJe10Il+aZpBIfWVZqnTSkUup 7Gic44F290sJY5QpUkGjge1qKH46/az9LMNflPV2zLvir7qm9gCX601amBBz3Ufvzqes 4NrGhQ/Fykx3Ns9LvuH+id38/BuFCBY7x+pLVuxNnDm6X4/RgUGZEu+QJ4ghCpxLY+qQ 8Uvk9Mvo0uUn7D4Gnn9wDaIZxfyxo8fv4/BGpW3VyUy0+3jv3ESVmQIzMpOY8IhbuhZl mmTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hKuxxa9a; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f1si13209980ejh.93.2021.06.02.04.53.58; Wed, 02 Jun 2021 04:54:21 -0700 (PDT) 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=@redhat.com header.s=mimecast20190719 header.b=hKuxxa9a; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229927AbhFBJBf (ORCPT + 99 others); Wed, 2 Jun 2021 05:01:35 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:22336 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229753AbhFBJBe (ORCPT ); Wed, 2 Jun 2021 05:01:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622624391; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=G01wiBaLKBgH8SUhvu9oGDvUb9DEe5X1aND1gEIw1Uw=; b=hKuxxa9aN0dRi9J1uEMKv5d2m+qIG8REu7EKa+Rl8i71tR5jmLDJfCHIjAYLDiNjPUhAKF gQRG5ixW4nQhQdHWecRVnZw/DR/S4ec3iLa/9xvx3MyBJ3oYIanxYN4alo7x37kYWhPyBy ALtiPJyCWHpbpDDJjWNKmUPAWD+iA9w= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-190-zwmvb23FO-28UhSOUcWeUg-1; Wed, 02 Jun 2021 04:59:49 -0400 X-MC-Unique: zwmvb23FO-28UhSOUcWeUg-1 Received: by mail-wm1-f72.google.com with SMTP id r15-20020a05600c35cfb029017cc4b1e9faso1906728wmq.8 for ; Wed, 02 Jun 2021 01:59:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=G01wiBaLKBgH8SUhvu9oGDvUb9DEe5X1aND1gEIw1Uw=; b=Rp0b+E5XfXTLe/Xsm8BGechUJ5ltMm8+J68Y1pjtJySqS/IAN+lgl08lhqJAjGhy5D fBW4iAkl9gmtnjk2P/OVHunabuJaILPC/sIPORFnvJEXCqhWoBGrUBa0EHZnVNr3uYvv pCVQwskP2oeQdsccg28T0NDzucxv848c00v8fLCIpheR2GtJWnIznrRm5s9ZpE2IEG96 Hzwk4wdp4pdTfaaYnpsl6VA05zImwO66czKIdMdiUVN1KJ9DHupr4GVUstIldSIr5gAQ UFhdXZrKx+hy8fv9ERZAvrFzW3dL4qmuytYmAUMPYgU62ODt17bsjIo2+FLdiWLT4yYI dLTQ== X-Gm-Message-State: AOAM531jj0lqMX/JomP0pKjf2AxNnAxTmXVJsYfXVeIgwivA9K1yL9op av2E1kK7NsHqS51AeCOY6/AAkJpHAaJuWTzAIiU2Uk1d1VN1snU8Vs5K0cJnSzmaaO5BzuDZoFo JXT+b+KsiMSCOm4TEAKHEzfHv X-Received: by 2002:a1c:b403:: with SMTP id d3mr30619884wmf.79.1622624388640; Wed, 02 Jun 2021 01:59:48 -0700 (PDT) X-Received: by 2002:a1c:b403:: with SMTP id d3mr30619871wmf.79.1622624388470; Wed, 02 Jun 2021 01:59:48 -0700 (PDT) Received: from [192.168.3.132] (p5b0c6b6d.dip0.t-ipconnect.de. [91.12.107.109]) by smtp.gmail.com with ESMTPSA id m5sm1982332wmq.6.2021.06.02.01.59.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 02 Jun 2021 01:59:48 -0700 (PDT) Subject: Re: [PATCH 1/2] mm,memory_hotplug: align code to fit 80 characters per line To: Max Gurtovoy , akpm@linux-foundation.org, linux-mm@kvack.org Cc: pasha.tatashin@soleen.com, linux-kernel@vger.kernel.org, logang@deltatee.com References: <20210602084752.3534-1-mgurtovoy@nvidia.com> From: David Hildenbrand Organization: Red Hat Message-ID: Date: Wed, 2 Jun 2021 10:59:47 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210602084752.3534-1-mgurtovoy@nvidia.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02.06.21 10:47, Max Gurtovoy wrote: > The "if" clause can fit to one line. Also while we're here, fix the end > pfn print (use %#lx instead of #%lx). > I think the subject could be more expressive. I'd suggest "mm,memory_hotplug: cleanup alignment checks in check_pfn_span" Reviewed-by: David Hildenbrand > Signed-off-by: Max Gurtovoy > --- > mm/memory_hotplug.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c > index 70620d0dd923..8c3b423c1141 100644 > --- a/mm/memory_hotplug.c > +++ b/mm/memory_hotplug.c > @@ -288,10 +288,9 @@ static int check_pfn_span(unsigned long pfn, unsigned long nr_pages, > min_align = PAGES_PER_SUBSECTION; > else > min_align = PAGES_PER_SECTION; > - if (!IS_ALIGNED(pfn, min_align) > - || !IS_ALIGNED(nr_pages, min_align)) { > - WARN(1, "Misaligned __%s_pages start: %#lx end: #%lx\n", > - reason, pfn, pfn + nr_pages - 1); > + if (!IS_ALIGNED(pfn, min_align) || !IS_ALIGNED(nr_pages, min_align)) { > + WARN(1, "Misaligned __%s_pages start: %#lx end: %#lx\n", > + reason, pfn, pfn + nr_pages - 1); > return -EINVAL; > } > return 0; > -- Thanks, David / dhildenb