Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2967939ybt; Sat, 4 Jul 2020 02:32:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0beOyFClrLDtl0Ckqgg8cR1BPbktdfFAyjJIJhiVxCw0kpW8HrDct7DuhUnWHCPWo9ihB X-Received: by 2002:a17:906:3e54:: with SMTP id t20mr31255279eji.471.1593855179835; Sat, 04 Jul 2020 02:32:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593855179; cv=none; d=google.com; s=arc-20160816; b=Y2mFie9Y3SQX05godR+1reE5DHIcBYxRH5T2K2Swq0clJxPYN+vtpIBoNXdoGzfMWT U1IXDJu53Y57o9zcKm1ETdhvb3gQZcAmZfPXqsQx3LjZJAfn/RdJENAqqhffgJk+7jy3 ckIssXrh6caFTNT9dlhsan0YTZ7Gk4sFFTTK30I2PNdCfHR2KUWdKmUZ8nx2vtV2vLV6 z72cV8xGZIJkbUh5ceKSYpraqPTKHCIaORhY9gwqtI0kWTUEN38wEylYQ+LuzaG+OXrW vHq2+Kb9KLU64J01NCfhjIl1BxcaxOC+OgMzstUmNYUic4/WEIMW4CADNebMghG7syBb ShOw== 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; bh=iQ2IbytdNT6KFkSEdiSlBviscTZ4cT4tmhaoTUCN8Kk=; b=EScf5h8Ky2+T1by2Zd187oMTZs4OiEf9ojcDn/ryYXubiEY7LYFQrlb+t3P5AXs1/w CblSjz8dcKGPm+XEGsGE/nmvAqXegYYFJYczXrsoh5ZQTfQHCn1J5RyApcqrkGLuNYyA Y9uQrIg3iacuVD5zmo9WNNIW7o0mlPFkPus6325l7eZfghSjOLTxhgHNDO21xRkUuD5u 88+9EJJFccGyqqnlp/UCDBaUEKyEx+h9WdJx4ohIsZ26WoPvvpUMNzvGQobcYmkQve0Z hVN4nVrSs0+JdvSKWum7byRGFUP7pGi1FkgVI9IFXqNHyKC0TZZHZl+zum+V58LDqXX1 acpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QRb3RKIk; 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 s14si8968237ejq.387.2020.07.04.02.32.36; Sat, 04 Jul 2020 02:32:59 -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=QRb3RKIk; 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 S1726869AbgGDJaY (ORCPT + 99 others); Sat, 4 Jul 2020 05:30:24 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:60885 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726259AbgGDJaY (ORCPT ); Sat, 4 Jul 2020 05:30:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593855023; 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: in-reply-to:in-reply-to:references:references; bh=iQ2IbytdNT6KFkSEdiSlBviscTZ4cT4tmhaoTUCN8Kk=; b=QRb3RKIk9n9zZe3oirHlFdKo4wEuAxqZpeQhvUjMY8E999I7fSLsuEdiO2O7aOR779HbiI 8e29X5Zu5YimQjoGemwR7MqgPh1w/zPGooSgRm6M/VfQb9H8ewaqfNaTFhW3vlRu7rKEoH hviZGFkHvIOvlfWSa05lhY9VgdJREo4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-324-uApKl32hP2SZZ_OaEtmksw-1; Sat, 04 Jul 2020 05:30:13 -0400 X-MC-Unique: uApKl32hP2SZZ_OaEtmksw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CF336107ACF3; Sat, 4 Jul 2020 09:30:11 +0000 (UTC) Received: from localhost (ovpn-12-31.pek2.redhat.com [10.72.12.31]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DEC357AC86; Sat, 4 Jul 2020 09:30:10 +0000 (UTC) Date: Sat, 4 Jul 2020 17:30:08 +0800 From: Baoquan He To: John Ogness Cc: Petr Mladek , Andrea Parri , Sergey Senozhatsky , Paul McKenney , Peter Zijlstra , Greg Kroah-Hartman , kexec@lists.infradead.org, linux-kernel@vger.kernel.org, Steven Rostedt , Sergey Senozhatsky , Thomas Gleixner , Linus Torvalds Subject: Re: [PATCH v3 1/3] crash: add VMCOREINFO macro to define offset in a struct declared by typedef Message-ID: <20200704093008.GA23574@MiWiFi-R3L-srv> References: <20200618144919.9806-1-john.ogness@linutronix.de> <20200618144919.9806-2-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200618144919.9806-2-john.ogness@linutronix.de> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/18/20 at 04:55pm, John Ogness wrote: > The existing macro VMCOREINFO_OFFSET() can't be used for structures > declared via typedef because "struct" is not part of type definition. > > Create another macro for this purpose. > > Signed-off-by: John Ogness > --- > include/linux/crash_core.h | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/include/linux/crash_core.h b/include/linux/crash_core.h > index 525510a9f965..43b51c9df571 100644 > --- a/include/linux/crash_core.h > +++ b/include/linux/crash_core.h > @@ -53,6 +53,9 @@ phys_addr_t paddr_vmcoreinfo_note(void); > #define VMCOREINFO_OFFSET(name, field) \ > vmcoreinfo_append_str("OFFSET(%s.%s)=%lu\n", #name, #field, \ > (unsigned long)offsetof(struct name, field)) > +#define VMCOREINFO_TYPE_OFFSET(name, field) \ > + vmcoreinfo_append_str("OFFSET(%s.%s)=%lu\n", #name, #field, \ > + (unsigned long)offsetof(name, field)) Acked-by: Baoquan He > #define VMCOREINFO_LENGTH(name, value) \ > vmcoreinfo_append_str("LENGTH(%s)=%lu\n", #name, (unsigned long)value) > #define VMCOREINFO_NUMBER(name) \ > -- > 2.20.1 > > > _______________________________________________ > kexec mailing list > kexec@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/kexec >