From: Martin Wilck <mwilck@suse.com>
To: Bart Van Assche <Bart.VanAssche@wdc.com>,
"christophe.varoqui@opensvc.com" <christophe.varoqui@opensvc.com>
Cc: "dm-devel@redhat.com" <dm-devel@redhat.com>
Subject: Re: [PATCH 5/6] libmultipath: Fix sgio_get_vpd()
Date: Tue, 06 Mar 2018 00:24:03 +0100 [thread overview]
Message-ID: <1520292243.7660.57.camel@suse.com> (raw)
In-Reply-To: <1520284430.2826.39.camel@wdc.com>
On Mon, 2018-03-05 at 21:13 +0000, Bart Van Assche wrote:
> On Mon, 2018-03-05 at 21:47 +0100, Martin Wilck wrote:
> > On Mon, 2018-03-05 at 19:18 +0000, Bart Van Assche wrote:
> > > On Mon, 2018-03-05 at 20:14 +0100, Martin Wilck wrote:
> > > > Unless you object, I'll repost your series rebased on mine.
> > >
> > > Hello Martin,
> > >
> > > Before you start working on that: has your patch series already
> > > been
> > > posted
> > > on the dm-devel mailing list?
> >
> > Yes. "PATCH v2 00/20] Various multipath-tools fixes" ff.
> > https://www.redhat.com/archives/dm-devel/2018-January/msg00219.html
>
> Ah, thanks, but unfortunately these patches are no longer in my
> mailbox. I
> pulled these from https://github.com/openSUSE/multipath-tools. I'm
> fine with
> my patches being rebased on top of your series, whether or not the
> following
> issues get addressed:
> * Several patches that are on the upstream-queue branch introduce
> trailing
> whitespace.
> * The macro FREE_CONST() should never have been introduced.
> Introducing such
> a macro namely introduces the risk of calling free() for a string
> constant,
> something that should never happen. Have you considered to declare
> dynamically allocated strings, e.g. the result of strdup(), as char
> *
> instead of const char * ? I think with that change the FREE_CONST()
> macro
> definitions can be removed again.
Another philosophical issue :-) I disagree with you here. The name
FREE_CONST is obvious enough that people should think twice before
using it. I have indeed considered what you propse, but I like being
able to use "const char*" when I work with strings that shouldn't be
changed. An accidental write to a const location is much easier to
overlook than a FREE_CONST(). Freeing a "const char*" isn't always
wrong, just if the pointer was passed in from elsewhere.
This issue is philosophical but not religious to me, so if you and
maybe others are offended so much by FREE_CONST, I may ditch it again.
Regards,
Martin
--
Dr. Martin Wilck <mwilck@suse.com>, Tel. +49 (0)911 74053 2107
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
next prev parent reply other threads:[~2018-03-05 23:24 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-01 19:29 [PATCH 0/6] Various multipath-tools patches Bart Van Assche
2018-03-01 19:29 ` [PATCH 1/6] multipathd/main.c: Fix indentation Bart Van Assche
2018-03-05 16:09 ` Martin Wilck
2018-03-01 19:29 ` [PATCH 2/6] libmultipath, alloc_path_with_pathinfo(): Ensure that pp->wwid is '\0'-terminated Bart Van Assche
2018-03-05 16:11 ` Martin Wilck
2018-03-01 19:29 ` [PATCH 3/6] libmultipath, alloc_path_with_pathinfo(): Declare third argument const Bart Van Assche
2018-03-05 16:18 ` Martin Wilck
2018-03-05 16:21 ` Bart Van Assche
2018-03-01 19:29 ` [PATCH 4/6] kpartx: Improve reliability of find_loop_by_file() Bart Van Assche
2018-03-05 18:38 ` Martin Wilck
2018-03-01 19:29 ` [PATCH 5/6] libmultipath: Fix sgio_get_vpd() Bart Van Assche
2018-03-05 16:53 ` Martin Wilck
2018-03-05 17:09 ` Martin Wilck
2018-03-05 19:14 ` Martin Wilck
2018-03-05 19:18 ` Bart Van Assche
2018-03-05 20:47 ` Martin Wilck
2018-03-05 21:13 ` Bart Van Assche
2018-03-05 23:24 ` Martin Wilck [this message]
2018-03-05 23:35 ` Martin Wilck
2018-03-01 19:29 ` [PATCH 6/6] Introduce the ibmultipath/unaligned.h header file Bart Van Assche
2018-03-05 17:18 ` Martin Wilck
2018-03-06 15:25 ` [PATCH 0/6] Various multipath-tools patches Benjamin Marzinski
2018-03-07 9:56 ` Christophe Varoqui
2018-03-08 20:39 ` Bart Van Assche
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1520292243.7660.57.camel@suse.com \
--to=mwilck@suse.com \
--cc=Bart.VanAssche@wdc.com \
--cc=christophe.varoqui@opensvc.com \
--cc=dm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.