From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Walker Subject: Re: [PATCH v18 20/80] c/r: basic infrastructure for checkpoint/restart Date: Thu, 24 Sep 2009 09:03:41 -0700 Message-ID: <1253808221.20648.196.camel@desktop> References: <1253749920-18673-1-git-send-email-orenl@librato.com> <1253749920-18673-21-git-send-email-orenl@librato.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1253749920-18673-21-git-send-email-orenl-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org> Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Oren Laadan Cc: Andrew Morton , Linus Torvalds , containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Serge Hallyn , Ingo Molnar , Pavel Emelyanov , Oren Laadan List-Id: linux-api@vger.kernel.org On Wed, 2009-09-23 at 19:51 -0400, Oren Laadan wrote: > / > +static char *__ckpt_generate_fmt(struct ckpt_ctx *ctx, char *prefmt, char *fmt) > +{ > + static int warn_notask = 0; > + static int warn_prefmt = 0; Shouldn't need the initializer since it's static.. > +/* read the checkpoint header */ > +static int restore_read_header(struct ckpt_ctx *ctx) > +{ > + struct ckpt_hdr_header *h; > + struct new_utsname *uts = NULL; > + int ret; > + > + h = ckpt_read_obj_type(ctx, sizeof(*h), CKPT_HDR_HEADER); > + if (IS_ERR(h)) > + return PTR_ERR(h); > + > + ret = -EINVAL; > + if (h->magic != CHECKPOINT_MAGIC_HEAD || > + h->rev != CHECKPOINT_VERSION || > + h->major != ((LINUX_VERSION_CODE >> 16) & 0xff) || > + h->minor != ((LINUX_VERSION_CODE >> 8) & 0xff) || > + h->patch != ((LINUX_VERSION_CODE) & 0xff)) > + goto out; Do you still need this LINUX_VERSION_CODE stuff ? I would think once it's in mainline you wouldn't need to track that.. These both got flagged by checkpatch .. Your series is marked in a couple other places with checkpatch errors .. If you haven't already reviewed those errors, it would be a good idea to review them. Daniel -- To unsubscribe from this list: send the line "unsubscribe linux-api" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753234AbZIXQDx (ORCPT ); Thu, 24 Sep 2009 12:03:53 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753110AbZIXQDw (ORCPT ); Thu, 24 Sep 2009 12:03:52 -0400 Received: from fifo99.com ([67.223.236.141]:46525 "EHLO fifo99.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753115AbZIXQDw (ORCPT ); Thu, 24 Sep 2009 12:03:52 -0400 Subject: Re: [PATCH v18 20/80] c/r: basic infrastructure for checkpoint/restart From: Daniel Walker To: Oren Laadan Cc: Andrew Morton , Linus Torvalds , containers@lists.linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-api@vger.kernel.org, Serge Hallyn , Ingo Molnar , Pavel Emelyanov , Oren Laadan In-Reply-To: <1253749920-18673-21-git-send-email-orenl@librato.com> References: <1253749920-18673-1-git-send-email-orenl@librato.com> <1253749920-18673-21-git-send-email-orenl@librato.com> Content-Type: text/plain Date: Thu, 24 Sep 2009 09:03:41 -0700 Message-Id: <1253808221.20648.196.camel@desktop> Mime-Version: 1.0 X-Mailer: Evolution 2.26.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2009-09-23 at 19:51 -0400, Oren Laadan wrote: > / > +static char *__ckpt_generate_fmt(struct ckpt_ctx *ctx, char *prefmt, char *fmt) > +{ > + static int warn_notask = 0; > + static int warn_prefmt = 0; Shouldn't need the initializer since it's static.. > +/* read the checkpoint header */ > +static int restore_read_header(struct ckpt_ctx *ctx) > +{ > + struct ckpt_hdr_header *h; > + struct new_utsname *uts = NULL; > + int ret; > + > + h = ckpt_read_obj_type(ctx, sizeof(*h), CKPT_HDR_HEADER); > + if (IS_ERR(h)) > + return PTR_ERR(h); > + > + ret = -EINVAL; > + if (h->magic != CHECKPOINT_MAGIC_HEAD || > + h->rev != CHECKPOINT_VERSION || > + h->major != ((LINUX_VERSION_CODE >> 16) & 0xff) || > + h->minor != ((LINUX_VERSION_CODE >> 8) & 0xff) || > + h->patch != ((LINUX_VERSION_CODE) & 0xff)) > + goto out; Do you still need this LINUX_VERSION_CODE stuff ? I would think once it's in mainline you wouldn't need to track that.. These both got flagged by checkpatch .. Your series is marked in a couple other places with checkpatch errors .. If you haven't already reviewed those errors, it would be a good idea to review them. Daniel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail203.messagelabs.com (mail203.messagelabs.com [216.82.254.243]) by kanga.kvack.org (Postfix) with SMTP id B28466B004D for ; Thu, 24 Sep 2009 12:03:55 -0400 (EDT) Subject: Re: [PATCH v18 20/80] c/r: basic infrastructure for checkpoint/restart From: Daniel Walker In-Reply-To: <1253749920-18673-21-git-send-email-orenl@librato.com> References: <1253749920-18673-1-git-send-email-orenl@librato.com> <1253749920-18673-21-git-send-email-orenl@librato.com> Content-Type: text/plain Date: Thu, 24 Sep 2009 09:03:41 -0700 Message-Id: <1253808221.20648.196.camel@desktop> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org To: Oren Laadan Cc: Andrew Morton , Linus Torvalds , containers@lists.linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-api@vger.kernel.org, Serge Hallyn , Ingo Molnar , Pavel Emelyanov , Oren Laadan List-ID: On Wed, 2009-09-23 at 19:51 -0400, Oren Laadan wrote: > / > +static char *__ckpt_generate_fmt(struct ckpt_ctx *ctx, char *prefmt, char *fmt) > +{ > + static int warn_notask = 0; > + static int warn_prefmt = 0; Shouldn't need the initializer since it's static.. > +/* read the checkpoint header */ > +static int restore_read_header(struct ckpt_ctx *ctx) > +{ > + struct ckpt_hdr_header *h; > + struct new_utsname *uts = NULL; > + int ret; > + > + h = ckpt_read_obj_type(ctx, sizeof(*h), CKPT_HDR_HEADER); > + if (IS_ERR(h)) > + return PTR_ERR(h); > + > + ret = -EINVAL; > + if (h->magic != CHECKPOINT_MAGIC_HEAD || > + h->rev != CHECKPOINT_VERSION || > + h->major != ((LINUX_VERSION_CODE >> 16) & 0xff) || > + h->minor != ((LINUX_VERSION_CODE >> 8) & 0xff) || > + h->patch != ((LINUX_VERSION_CODE) & 0xff)) > + goto out; Do you still need this LINUX_VERSION_CODE stuff ? I would think once it's in mainline you wouldn't need to track that.. These both got flagged by checkpatch .. Your series is marked in a couple other places with checkpatch errors .. If you haven't already reviewed those errors, it would be a good idea to review them. Daniel -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org