Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1443093
| From | "Yu, Fenghua" <fenghua.yu@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | RE: [PATCH 30/32] x86/intel_rdt_rdtgroup.c: Process schemas input from rscctrl interface |
| Date | 2016-07-14 08:20 +0200 |
| Message-ID | <rUIa6-5Pz-13@gated-at.bofh.it> (permalink) |
| References | <rUe2l-2xx-3@gated-at.bofh.it> <rUe2p-2xx-111@gated-at.bofh.it> <rUD0J-2cF-7@gated-at.bofh.it> <rUIa6-5Pz-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> From: Thomas Gleixner [mailto:tglx@linutronix.de]
> Sent: Wednesday, July 13, 2016 11:11 PM
> On Wed, 13 Jul 2016, David Carrillo-Cisneros wrote:
> > > +static void free_cache_resource(struct cache_resource *l) {
> > > + kfree(l->cbm);
> > > + kfree(l->cbm2);
> > > + kfree(l->closid);
> > > + kfree(l->refcnt);
> >
> > this function is used to clean up alloc_cache_resource in the error
> > path of get_resources where it's not necessarily true that all of l's
> > members were allocated.
>
> kfree handles kfree(NULL) nicely.....
Yes, that's right. If I check the pointer before kfree(), checkpatch.pl will
report warning for that and suggest kfree(NULL) is safe and code is
short.
Thanks.
-Fenghua
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/32] Enable Intel Resource Allocation in Resource Director Technology "Fenghua Yu" <fenghua.yu@intel.com> - 2016-07-13 00:10 +0200
[PATCH 06/32] x86/intel_rdt: Hot cpu support for Cache Allocation "Fenghua Yu" <fenghua.yu@intel.com> - 2016-07-13 00:10 +0200
Re: [PATCH 06/32] x86/intel_rdt: Hot cpu support for Cache Allocation Thomas Gleixner <tglx@linutronix.de> - 2016-07-13 11:30 +0200
Re: [PATCH 06/32] x86/intel_rdt: Hot cpu support for Cache Allocation Shivappa Vikas <vikas.shivappa@linux.intel.com> - 2016-07-21 21:50 +0200
Re: [PATCH 06/32] x86/intel_rdt: Hot cpu support for Cache Allocation David Carrillo-Cisneros <davidcc@google.com> - 2016-07-14 02:50 +0200
RE: [PATCH 06/32] x86/intel_rdt: Hot cpu support for Cache Allocation "Yu, Fenghua" <fenghua.yu@intel.com> - 2016-07-15 01:00 +0200
[PATCH 19/32] sched.h: Add rg_list and rdtgroup in task_struct "Fenghua Yu" <fenghua.yu@intel.com> - 2016-07-13 00:10 +0200
Re: [PATCH 19/32] sched.h: Add rg_list and rdtgroup in task_struct Thomas Gleixner <tglx@linutronix.de> - 2016-07-13 15:10 +0200
RE: [PATCH 19/32] sched.h: Add rg_list and rdtgroup in task_struct "Yu, Fenghua" <fenghua.yu@intel.com> - 2016-07-13 20:00 +0200
[PATCH 21/32] x86/intel_rdt.h: Header for inter_rdt.c "Fenghua Yu" <fenghua.yu@intel.com> - 2016-07-13 00:10 +0200
[PATCH 12/32] x86/intel_rdt: Hot cpu update for code data prioritization "Fenghua Yu" <fenghua.yu@intel.com> - 2016-07-13 00:10 +0200
[PATCH 27/32] x86/intel_rdt_rdtgroup.c: Implement rscctrl file system commands "Fenghua Yu" <fenghua.yu@intel.com> - 2016-07-13 00:10 +0200
[PATCH 30/32] x86/intel_rdt_rdtgroup.c: Process schemas input from rscctrl interface "Fenghua Yu" <fenghua.yu@intel.com> - 2016-07-13 00:10 +0200
Re: [PATCH 30/32] x86/intel_rdt_rdtgroup.c: Process schemas input from rscctrl interface David Carrillo-Cisneros <davidcc@google.com> - 2016-07-14 02:50 +0200
RE: [PATCH 30/32] x86/intel_rdt_rdtgroup.c: Process schemas input from rscctrl interface "Yu, Fenghua" <fenghua.yu@intel.com> - 2016-07-14 08:20 +0200
Re: [PATCH 30/32] x86/intel_rdt_rdtgroup.c: Process schemas input from rscctrl interface Thomas Gleixner <tglx@linutronix.de> - 2016-07-14 08:20 +0200
RE: [PATCH 30/32] x86/intel_rdt_rdtgroup.c: Process schemas input from rscctrl interface "Yu, Fenghua" <fenghua.yu@intel.com> - 2016-07-14 08:40 +0200
[PATCH 02/32] x86/intel_rdt: Add support for Cache Allocation detection "Fenghua Yu" <fenghua.yu@intel.com> - 2016-07-13 00:10 +0200
[PATCH 01/32] x86/intel_rdt: Cache Allocation documentation "Fenghua Yu" <fenghua.yu@intel.com> - 2016-07-13 00:10 +0200
[PATCH 28/32] x86/intel_rdt_rdtgroup.c: Read and write cpus "Fenghua Yu" <fenghua.yu@intel.com> - 2016-07-13 00:10 +0200
[PATCH 03/32] x86/intel_rdt: Add Class of service management "Fenghua Yu" <fenghua.yu@intel.com> - 2016-07-13 00:20 +0200
[PATCH 04/32] x86/intel_rdt: Add L3 cache capacity bitmask management "Fenghua Yu" <fenghua.yu@intel.com> - 2016-07-13 00:20 +0200
Re: [PATCH 04/32] x86/intel_rdt: Add L3 cache capacity bitmask management Marcelo Tosatti <mtosatti@redhat.com> - 2016-07-22 23:10 +0200
Re: [PATCH 04/32] x86/intel_rdt: Add L3 cache capacity bitmask management "Luck, Tony" <tony.luck@intel.com> - 2016-07-22 23:50 +0200
[PATCH 05/32] x86/intel_rdt: Implement scheduling support for Intel RDT "Fenghua Yu" <fenghua.yu@intel.com> - 2016-07-13 00:20 +0200
Re: [PATCH 05/32] x86/intel_rdt: Implement scheduling support for Intel RDT Nilay Vaish <nilayvaish@gmail.com> - 2016-07-25 18:30 +0200
Re: [PATCH 05/32] x86/intel_rdt: Implement scheduling support for Intel RDT Nilay Vaish <nilayvaish@gmail.com> - 2016-07-25 18:40 +0200
Re: [PATCH 05/32] x86/intel_rdt: Implement scheduling support for Intel RDT "Luck, Tony" <tony.luck@intel.com> - 2016-07-25 20:10 +0200
csiph-web