id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
0421ea91ddc7895a5a68d3bc670ed4b8e6448a42 | Analyze and fix the following issue in the Linux kernel code: apparmor: Fix change_onexec when called from a confined task | Problem Details:
Fix failure in aa_change_onexec api when the request is made from a confined
task. This failure was caused by two problems
The AA_MAY_ONEXEC perm was not being mapped correctly for this case.
The executable name was being checked as second time instead of using the
requested onexec profile name, ... | ```diff
diff --git a/security/apparmor/domain.c b/security/apparmor/domain.c
index 7c69599a69e1..6327685c101e 100644
--- a/security/apparmor/domain.c
+++ b/security/apparmor/domain.c
@@ -410,7 +410,8 @@ int apparmor_bprm_set_creds(struct linux_binprm *bprm)
* exec\0change_profile
*/
state = aa_dfa_null_trans... |
7a3ae2f8c8c8432e65467b7fc84d5deab04061a0 | Analyze and fix the following issue in the Linux kernel code: Btrfs: fix regression in scrub path resolving | Problem Details:
In commit 4692cf58 we introduced new backref walking code for btrfs. This
assumes we're searching live roots, which requires a transaction context.
While scrubbing, however, we must not join a transaction because this could
deadlock with the commit path. Additionally, what scrub really wants to do
is r... | ```diff
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index 0436c12da8c2..56136d9046f0 100644
--- a/fs/btrfs/backref.c
+++ b/fs/btrfs/backref.c
@@ -116,6 +116,7 @@ add_parent:
* to a logical address
*/
static int __resolve_indirect_ref(struct btrfs_fs_info *fs_info,
+ int search_commit_root,
struc... |
2baab4e90495ebc9826c93f79d74d6e60a828d24 | Analyze and fix the following issue in the Linux kernel code: sched: Fix select_fallback_rq() vs cpu_active/cpu_online | Problem Details:
Commit 5fbd036b55 ("sched: Cleanup cpu_active madness"), which was
supposed to finally sort the cpu_active mess, instead uncovered more.
Since CPU_STARTING is ran before setting the cpu online, there's a
(small) window where the cpu has active,!online.
If during this time there's a wakeup of a task t... | ```diff
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h
index e9eaec522655..e0ffaf061ab7 100644
--- a/include/linux/cpuset.h
+++ b/include/linux/cpuset.h
@@ -22,7 +22,7 @@ extern int cpuset_init(void);
extern void cpuset_init_smp(void);
extern void cpuset_update_active_cpus(void);
extern void cpuset_cpu... |
23c18c71da801fb7ce11acc3041e4f10a1bb5cb0 | Analyze and fix the following issue in the Linux kernel code: drm/i915: fixup in-line clflushing on bit17 swizzled bos | Problem Details:
The issue is that with inline clflushing the clflushing isn't properly
swizzled. Fix this by
- always clflushing entire 128 byte chunks and
- unconditionally flush before writes when swizzling a given page.
We could be clever and check whether we pwrite a partial 128 byte
chunk instead of a partial... | ```diff
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 6dc832902f53..c964dfbdb577 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -313,6 +313,28 @@ shmem_pread_fast(struct page *page, int shmem_page_offset, int page_length,
return ret;
}
+... |
f56f821feb7b36223f309e0ec05986bb137ce418 | Analyze and fix the following issue in the Linux kernel code: mm: extend prefault helpers to fault in more than PAGE_SIZE | Problem Details:
drm/i915 wants to read/write more than one page in its fastpath
and hence needs to prefault more than PAGE_SIZE bytes.
Add new functions in filemap.h to make that possible.
Also kill a copy&pasted spurious space in both functions while at it.
v2: As suggested by Andrew Morton, add a multipage parame... | ```diff
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index e9cac478cced..6dc832902f53 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -416,7 +416,7 @@ i915_gem_shmem_pread(struct drm_device *dev,
mutex_unlock(&dev->struct_mutex);
if (!prefa... |
96d79b52701758404cf8701986891afc99ce810b | Analyze and fix the following issue in the Linux kernel code: drm/i915: don't clobber userspace memory before commiting to the pread | Problem Details:
The pagemap.h prefault helpers do the prefaulting by simply writing
some data into every page. Hence we should not prefault when we're not
yet commited to to actually writing data to userspace. The problem is
now that
- we can't prefault while holding dev->struct_mutex for we could
deadlock with our ... | ```diff
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 23f1a6bcee73..292a74f2fa87 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -300,6 +300,7 @@ i915_gem_shmem_pread(struct drm_device *dev,
int shmem_page_offset, page_length, ret = 0;
int... |
692a576b9ddf8006f1559e14a5022c0a100440f1 | Analyze and fix the following issue in the Linux kernel code: drm/i915: don't call shmem_read_mapping unnecessarily | Problem Details:
This speeds up pwrite and pread from ~120 µs ro ~100 µs for
reading/writing 1mb on my snb (if the backing storage pages
are already pinned, of course).
v2: Chris Wilson pointed out a glaring page reference bug - I've
unconditionally dropped the reference. With that fixed (and the
associated reduction ... | ```diff
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 75e3b841fffb..b253257c028e 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -301,6 +301,7 @@ i915_gem_shmem_pread(struct drm_device *dev,
int obj_do_bit17_swizzling, page_do_bit17_swizzlin... |
8489731c9bd22c27ab17a2190cd7444604abf95f | Analyze and fix the following issue in the Linux kernel code: drm/i915: move clflushing into shmem_pread | Problem Details:
This is obviously gonna slow down pread. But for a half-way realistic
micro-benchmark, it doesn't matter: Non-broken userspace reads back
data from the gpu once before the gpu again dirties it.
So all this ranged clflush tracking is just a waste of time.
No pread performance change (neglecting the du... | ```diff
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 1855e72859a8..9cdeeef5d6d7 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -304,12 +304,25 @@ i915_gem_shmem_pread(struct drm_device *dev,
int shmem_page_offset, page_length, ret = 0;
i... |
d1dd20a96524ac462ed4f28dae168b9637f079e5 | Analyze and fix the following issue in the Linux kernel code: drm/i915: clear the entire gtt when using gem | Problem Details:
We've lost our guard page somewhere in the gtt rewrite, this patch
here will restore it.
Exercised by i-g-t/tests/gem_cs_prefetch.
v2: Substract the guard page from the range we're supposed to manage
with gem. Suggested by Chris Wilson to increase the odds of old ums +
gem userspace not blowing up. T... | ```diff
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index c2d9eaedff33..4f690374fffe 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1207,8 +1207,6 @@ static int i915_load_gem_init(struct drm_device *dev)
/* PPGTT pdes are stolen from global g... |
d42c9e2c24f7e7897405b85816bdf4ac924881c0 | Analyze and fix the following issue in the Linux kernel code: drm/i915: reinstate GM45 TV detection fix | Problem Details:
This reverts commmit d4b74bf07873da2e94219a7b67a334fc1c3ce649 which
reverted the origin fix fb8b5a39b6310379d7b54c0c7113703a8eaf4a57.
We have at least 3 different bug reports that this fixes things and no
indication what is exactly wrong with this. So try again.
To make matters slightly more fun, the... | ```diff
diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c
index 05f765ef5464..ca12c709f3eb 100644
--- a/drivers/gpu/drm/i915/intel_tv.c
+++ b/drivers/gpu/drm/i915/intel_tv.c
@@ -1153,6 +1153,15 @@ intel_tv_detect_type(struct intel_tv *intel_tv,
DAC_B_0_7_V |
DAC_C_0_7_V);
+
+ ... |
fada8dcf2d085f4e2eb1ba760c8d37111977dbec | Analyze and fix the following issue in the Linux kernel code: ARM: fix Kconfig warning for HAVE_BPF_JIT | Problem Details:
Last night's randconfig and the allnoconfig builds spat out the
following warning while building:
warning: (ARM) selects HAVE_BPF_JIT which has unmet direct dependencies (NET)
Acked-by: Mircea Gherzan <mgherzan@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> | ```diff
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 93f89d5b24c2..be8f634f001e 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -34,7 +34,7 @@ config ARM
select GENERIC_IRQ_SHOW
select CPU_PM if (SUSPEND || CPU_IDLE)
select GENERIC_PCI_IOMAP
- select HAVE_BPF_JIT
+ select HAVE_BPF_JIT if NET
h... |
a93107355d2d4557e7e19ea1724bdb710268cd34 | Analyze and fix the following issue in the Linux kernel code: [SCSI] vmw_pvscsi: Try setting host->max_id as suggested by the device. | Problem Details:
Fetch the config page from the device to learn max target id to set
host->max_id.
Also, fix some indentation issues and update the 'Maintained by' field.
Signed-off-by: Arvind Kumar <arvindkumar@vmware.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com> | ```diff
diff --git a/drivers/scsi/vmw_pvscsi.c b/drivers/scsi/vmw_pvscsi.c
index 7264116185d5..4411d4224401 100644
--- a/drivers/scsi/vmw_pvscsi.c
+++ b/drivers/scsi/vmw_pvscsi.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, ... |
3f0bc3b331a371392bb64c5b211b60ec84d5a444 | Analyze and fix the following issue in the Linux kernel code: [SCSI] scsi_debug: Fix incorrect page length in logical block provisioning VPD | Problem Details:
The page length for the 0xb2 VPD page is defined to be 4 bytes when no
provisioning descriptors are provided (DP=0).
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com> | ```diff
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index e4ba924c303d..255570dd7c36 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -780,7 +780,7 @@ static int inquiry_evpd_b1(unsigned char *arr)
/* Logical block provisioning VPD page (SBC-3) */
static int inquiry_evp... |
be1dd78de5686c062bb3103f9e86d444a10ed783 | Analyze and fix the following issue in the Linux kernel code: [SCSI] scsi_debug: add LBPRZ support | Problem Details:
Add LBPRZ support to scsi_debug; i.e. read zeros for
unmapped blocks.
Rather than checking for unmapped blocks at
read time, this just zeroes them on the backing store
at unmap time so it behaves the same way.
This also adds a module parameter to disable it.
lbprz, "unmapped blocks return 0 on read ... | ```diff
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index 8917154d96c7..e4ba924c303d 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -101,6 +101,7 @@ static const char * scsi_debug_version_date = "20100324";
#define DEF_LBPU 0
#define DEF_LBPWS 0
#define DEF_LBPWS10 0... |
49d0e64b6a61acea3bcdd6b36be3972111edecc5 | Analyze and fix the following issue in the Linux kernel code: [SCSI] iscsi class: fix gfp use in ping compl and host event | Problem Details:
If a ping or host event were to occur when memory is low
we do not want to use GFP_KERNEL, because the paths
sending them cannot block for data to be written. These
paths might be needed to recover write paths. Use GFP_NOIO
instead.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Ja... | ```diff
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
index fac31730addf..1cf640e575da 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -1486,7 +1486,7 @@ void iscsi_post_host_event(uint32_t host_no, struct iscsi_transport *transport,... |
76c8ae4b2fbcbc92601c48e1b534c35638c8d597 | Analyze and fix the following issue in the Linux kernel code: [SCSI] bfa: Fix endian bug in bfad_iocmd_debug_fw_core(). | Problem Details:
Casting pointer from native data type to other type is
endian-sensitive.
"iocmd->offset" is 64 bit but we use only first 32 bit.
It works in little-endian system but in big-endian system
it will break.
Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
Acked-by: Jing Huang <huangj@brocade.c... | ```diff
diff --git a/drivers/scsi/bfa/bfad_bsg.c b/drivers/scsi/bfa/bfad_bsg.c
index 8005c6c5a080..f62cf4981473 100644
--- a/drivers/scsi/bfa/bfad_bsg.c
+++ b/drivers/scsi/bfa/bfad_bsg.c
@@ -1918,6 +1918,7 @@ bfad_iocmd_debug_fw_core(struct bfad_s *bfad, void *cmd,
struct bfa_bsg_debug_s *iocmd = (struct bfa_bsg_debu... |
8a0cee4bfa92fb4acaf93e86780ceab3694ca6d5 | Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.3.30: Revert fix for Link Pull Causes I/O Failures | Problem Details:
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com> | ```diff
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index 2e65168d8723..88f3a83dbd2e 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -4187,15 +4187,6 @@ lpfc_queuecommand_lck(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *))
cmnd->result = err... |
f5eca9be1424ffa76b36dce4a821c051b37a8ab9 | Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.3.30: Fix handling of REG_VFI and cable pull. | Problem Details:
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com> | ```diff
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
index 24e4c0206482..b507536dc5b5 100644
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -2843,7 +2843,14 @@ lpfc_mbx_cmpl_reg_vfi(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq)
struct lpfc_vport *vpo... |
0a8a86facf359147b2d3ef796496a09b21984b03 | Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.3.30: Fix resource leak when acc fails for received plogi | Problem Details:
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com> | ```diff
diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c
index 7b6b2aa5795a..cc5dcd9e7d24 100644
--- a/drivers/scsi/lpfc/lpfc_nportdisc.c
+++ b/drivers/scsi/lpfc/lpfc_nportdisc.c
@@ -440,11 +440,15 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
spin_unlock... |
8fcb8acd6cb1529c596c274a6d375cbe9a134dcb | Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.3.30: Fix SLI4 driver module load and unload | Problem Details:
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com> | ```diff
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 1afa50f54b87..1ce36bc9c56b 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -5821,10 +5821,9 @@ lpfc_sli4_post_status_check(struct lpfc_hba *phba)
readl(phba->sli4_hba.u.if_type2.
... |
401ee0c1d698e798a9317e2ed6207badae93e266 | Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.3.30: Fix deadlock during adapter offline request | Problem Details:
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com> | ```diff
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 5b66142dbf56..d8e8270b1584 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -2704,16 +2704,14 @@ lpfc_offline_prep(struct lpfc_hba * phba)
}
spin_lock_irq(shost->host_lock);
ndlp->nlp... |
97f2ecf1f401d689d4036f64c244fad3b39e5e0a | Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.3.30: Fix RPI registered multiple times after HBA reset | Problem Details:
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com> | ```diff
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index c61508d7a0a1..5b66142dbf56 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -5230,8 +5230,7 @@ lpfc_sli4_create_rpi_hdr(struct lpfc_hba *phba)
* rpi is normalized to a zero base because the physi... |
5c1db2accd4b3e21aa7440526af9d2d0ccf5241c | Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.3.30: Fix driver handling of XRI Aborted CQE response | Problem Details:
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com> | ```diff
diff --git a/drivers/scsi/lpfc/lpfc_hw4.h b/drivers/scsi/lpfc/lpfc_hw4.h
index 9e2b9b227e1a..4aecb5c4e602 100644
--- a/drivers/scsi/lpfc/lpfc_hw4.h
+++ b/drivers/scsi/lpfc/lpfc_hw4.h
@@ -338,6 +338,12 @@ struct lpfc_cqe {
#define CQE_CODE_XRI_ABORTED 0x5
#define CQE_CODE_RECEIVE_V1 0x9
+/*
+ * Define mask... |
41899be7e8b95c9c8b51ad4ff932769af508306f | Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.3.30: Fix port and system failure in SLI4 FC function reset | Problem Details:
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com> | ```diff
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index b38f99f3be32..c61508d7a0a1 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -2786,9 +2786,13 @@ lpfc_scsi_buf_update(struct lpfc_hba *phba)
spin_lock_irq(&phba->hbalock);
spin_lock(&phba->scsi... |
bdcd2b926192c7f690a9cb4fb2de30eb820983fc | Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.3.30: Fix lack of LOGO with vport delete. | Problem Details:
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com> | ```diff
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 6b9415fd9c52..5a15ce848285 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -1,7 +1,7 @@
/*******************************************************************
* This file is part of the Emulex Linux D... |
a7baef1211b0ac218299965481e7cff9d68c1edd | Analyze and fix the following issue in the Linux kernel code: mtd: docg3 fix inbound calculations | Problem Details:
The last erase block was not accessible, as the out of bound
check was incorrectly rejecting the last block.
The read/write/erase offset checks were forbidding the usage of the
last block, because of the calculation which was considering the
byte after the last instead of the last byte.
Signed-off-by:... | ```diff
diff --git a/drivers/mtd/devices/docg3.c b/drivers/mtd/devices/docg3.c
index f5930caa38e7..62e01113c317 100644
--- a/drivers/mtd/devices/docg3.c
+++ b/drivers/mtd/devices/docg3.c
@@ -872,11 +872,8 @@ static int doc_read_oob(struct mtd_info *mtd, loff_t from,
if (ooblen % DOC_LAYOUT_OOB_SIZE)
return -EINVAL... |
a78da28776496d3a850ce741d3474b65057e156b | Analyze and fix the following issue in the Linux kernel code: mtd: nand: gpmi: fix function annotations | Problem Details:
A lot of functions have been marked __devinit, but they shouldn't, because they
are needed for bbt_scan. While I believe the whole MX23 handling should be done
entirely different, I am missing the resources to fix it. So, let's have at least
the annotations correct.
Signed-off-by: Wolfram Sang <w.sang... | ```diff
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
index f39f83e2e971..75b1dde16358 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
+++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
@@ -1155,7 +1155,7 @@ static int gpmi_block_markbad(struct mtd_info *mtd, loff_t ofs)
r... |
b11ec57fc6e6d4882ef01a0c09a1dde58f50492e | Analyze and fix the following issue in the Linux kernel code: mtd: phram: fix section mismatch for phram_setup | Problem Details:
phram_setup() is only called from init_phram() which is in .init.text,
so it must be in the same section to avoid a section mismatch warning.
Signed-off-by: Ryosuke Saito <raitosyo@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodh... | ```diff
diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c
index 3d91ace1ee4c..67823de68db6 100644
--- a/drivers/mtd/devices/phram.c
+++ b/drivers/mtd/devices/phram.c
@@ -215,7 +215,7 @@ static inline void kill_final_newline(char *str)
*/
static __initdata char phram_paramline[64+12+12];
-stati... |
452380efbd72d8d41f53ea64c8a6ea1fedc4394d | Analyze and fix the following issue in the Linux kernel code: mtd: sm_ftl: fix typo in major number. | Problem Details:
major == 0 allocates dynamic major, not major == -1
Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> | ```diff
diff --git a/drivers/mtd/sm_ftl.c b/drivers/mtd/sm_ftl.c
index 072ed5970e2f..9e2dfd517aa5 100644
--- a/drivers/mtd/sm_ftl.c
+++ b/drivers/mtd/sm_ftl.c
@@ -1256,7 +1256,7 @@ static void sm_remove_dev(struct mtd_blktrans_dev *dev)
static struct mtd_blktrans_ops sm_ftl_ops = {
.name = "smblk",
- .major = -1... |
30053b87d5b97aca28dd7a59982cbb161eaf01c6 | Analyze and fix the following issue in the Linux kernel code: mtd: fix section mismatch for doc_probe_device | Problem Details:
doc_probe_device() is only called from docg3_probe() which is in .init.text,
so it must be in the same section to avoid a section mismatch warning.
Signed-off-by: Ryosuke Saito <raitosyo@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David... | ```diff
diff --git a/drivers/mtd/devices/docg3.c b/drivers/mtd/devices/docg3.c
index 349bbfa74d0d..f5930caa38e7 100644
--- a/drivers/mtd/devices/docg3.c
+++ b/drivers/mtd/devices/docg3.c
@@ -1847,8 +1847,8 @@ static void __init doc_set_driver_info(int chip_id, struct mtd_info *mtd)
* if a memory allocation failed. If... |
b533f8d84f4f0807bf1bcf52017c6a267c8c4405 | Analyze and fix the following issue in the Linux kernel code: mtd: nand/fsmc: Flip the bit only if the error index is < 4096 | Problem Details:
ECC can correct up to 8 bits in 512 bytes data + 13 bytes ecc. This means that
the algorithm can correct a max of 8 bits in 4200 bits ie the error indices can
be from 0 to 4199. Of these 0 to 4095 are for data and 4096 to 4199 for ecc.
The driver flips the bit only if the index is <= 4096. This is a b... | ```diff
diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c
index bd423390d330..6a0bca17c223 100644
--- a/drivers/mtd/nand/fsmc_nand.c
+++ b/drivers/mtd/nand/fsmc_nand.c
@@ -654,7 +654,7 @@ static int fsmc_bch8_correct_data(struct mtd_info *mtd, uint8_t *dat,
change_bit(0, (unsigned long *)&err_... |
aea686b47c0cf97e0c6941799b523b6df87fc234 | Analyze and fix the following issue in the Linux kernel code: mtd: nand/fsmc: Read only 512 + 13 bytes for 8bit NAND devices | Problem Details:
The ECC logic of FSMC works on 512 bytes data + 13 bytes ECC to generate error
indices of up to 8 incorrect bits. The FSMC driver reads 14 instead of 13 oob
bytes to accommodate for 16 bit device as well.
Unfortunately, the internal ecc state machine gets corrupted for 8 bit devices
reading 512 + 14 b... | ```diff
diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c
index 902ba0d9c32d..bd423390d330 100644
--- a/drivers/mtd/nand/fsmc_nand.c
+++ b/drivers/mtd/nand/fsmc_nand.c
@@ -549,7 +549,9 @@ static int fsmc_read_page_hwecc(struct mtd_info *mtd, struct nand_chip *chip,
* to read at least 13 byte... |
7147032485293fc24751e4dede98ff29050fd3bd | Analyze and fix the following issue in the Linux kernel code: mtd: nand/fsmc: Pass partition information through platform data | Problem Details:
This patch reimplements the passing of partition information through platform
data. This was unintentionally deleted in commit
0d04eda1430e9a796214bee644b7e05d99cfe613
"mtd: fsmc_nand.c: use mtd_device_parse_register"
Artem: fix gcc warning about passin 0 instead of NULL.
Signed-off-by: Vipin Kumar <... | ```diff
diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c
index 588e3733c3a4..7338d33fe1ed 100644
--- a/drivers/mtd/nand/fsmc_nand.c
+++ b/drivers/mtd/nand/fsmc_nand.c
@@ -333,6 +333,8 @@ static struct mtd_partition partition_info_128KB_blk[] = {
* @pid: Part ID on the AMBA PrimeCell format
... |
09ef90d965fff295da8d5359ac21e54c02236dba | Analyze and fix the following issue in the Linux kernel code: mtd: gpmi: fix the wrong DMA command. | Problem Details:
The last DMA command of ECC read page is used to disable the BCH module.
But the original code missed to set the pio[2] which is used to set the
GPMI_HW_GPMI_ECCCTRL register. fix it now.
Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.c... | ```diff
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c b/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
index 5e3c5051e6a2..c34dab17682e 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
+++ b/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
@@ -1061,8 +1061,9 @@ int gpmi_read_page(struct gpmi_nand_data *this,
| BF_GPMI_CTRL0_ADDR... |
d107bc34f4953852834f086968fc7963125d6943 | Analyze and fix the following issue in the Linux kernel code: mtd: docg3 reduce read alignment burden | Problem Details:
The read function was so far requiring the reads to be aligned on page
boundaries, and be page length multiples in size. Relieve these
constraints to ease the userspace ubifs programs runs, which read ubifs
headers of 64 bytes.
Artem: squashed a later fix from Robert Jarzmik into this patch.
Signed-o... | ```diff
diff --git a/drivers/mtd/devices/docg3.c b/drivers/mtd/devices/docg3.c
index 3eafef383a39..2c1d0fca6757 100644
--- a/drivers/mtd/devices/docg3.c
+++ b/drivers/mtd/devices/docg3.c
@@ -734,7 +734,7 @@ err:
* doc_read_page_getbytes - Reads bytes from a prepared page
* @docg3: the device
* @len: the number of... |
42d7fbe223ab878b23de9e3b0166f8cd665a2aa5 | Analyze and fix the following issue in the Linux kernel code: mtd: do not use plain 0 as NULL | Problem Details:
The first 3 arguments of 'mtd_device_parse_register()' are pointers,
but many callers pass '0' instead of 'NULL'. Fix this globally. Thanks
to coccinelle for making it easy to do with the following semantic patch:
@@
expression mtd, types, parser_data, parts, nr_parts;
@@
(
-mtd_device_parse_regi... | ```diff
diff --git a/arch/mips/cavium-octeon/flash_setup.c b/arch/mips/cavium-octeon/flash_setup.c
index 0a430e06f5e5..e44a55bc7f0d 100644
--- a/arch/mips/cavium-octeon/flash_setup.c
+++ b/arch/mips/cavium-octeon/flash_setup.c
@@ -60,7 +60,7 @@ static int __init flash_init(void)
if (mymtd) {
mymtd->owner = THIS_... |
ee478af8b675908b217198a75cf759d422a81ccb | Analyze and fix the following issue in the Linux kernel code: mtd: maps: sa1100-flash: Add reference counter to set_vpp() | Problem Details:
This patch is part of a set which fixes unnecessary flash erase and write errors
resulting from the MTD CFI driver turning off vpp while an erase is in progress.
This patch allows sa1100_set_vpp() calls to be nested by adding a reference
counter.
Signed-off-by: Paul Parsons <lost.distance@yahoo.com>
S... | ```diff
diff --git a/drivers/mtd/maps/sa1100-flash.c b/drivers/mtd/maps/sa1100-flash.c
index cbc3b7867910..1eaf7b6c35e5 100644
--- a/drivers/mtd/maps/sa1100-flash.c
+++ b/drivers/mtd/maps/sa1100-flash.c
@@ -36,10 +36,22 @@ struct sa_info {
struct sa_subdev_info subdev[0];
};
+static DEFINE_SPINLOCK(sa1100_vpp_lock... |
7c8d206f219fe52966d970f791246a542718e5ba | Analyze and fix the following issue in the Linux kernel code: mtd: maps: pcmciamtd: Add reference counter to set_vpp() | Problem Details:
This patch is part of a set which fixes unnecessary flash erase and write errors
resulting from the MTD CFI driver turning off vpp while an erase is in progress.
This patch allows pcmciamtd_set_vpp() calls to be nested by adding a reference
counter.
Signed-off-by: Paul Parsons <lost.distance@yahoo.com... | ```diff
diff --git a/drivers/mtd/maps/pcmciamtd.c b/drivers/mtd/maps/pcmciamtd.c
index e8e9fec23553..7d5cf369f0ad 100644
--- a/drivers/mtd/maps/pcmciamtd.c
+++ b/drivers/mtd/maps/pcmciamtd.c
@@ -295,13 +295,24 @@ static void pcmcia_copy_to(struct map_info *map, unsigned long to, const void *f
}
+static DEFINE_SPIN... |
5fbabf3f45a15c2b39170980cee01368138f4d79 | Analyze and fix the following issue in the Linux kernel code: mtd: maps: l440gx: Add reference counter to set_vpp() | Problem Details:
This patch is part of a set which fixes unnecessary flash erase and write errors
resulting from the MTD CFI driver turning off vpp while an erase is in progress.
This patch allows l440gx_set_vpp() calls to be nested by adding a reference
counter.
Signed-off-by: Paul Parsons <lost.distance@yahoo.com>
S... | ```diff
diff --git a/drivers/mtd/maps/l440gx.c b/drivers/mtd/maps/l440gx.c
index dd0360ba2412..74bd98ee635f 100644
--- a/drivers/mtd/maps/l440gx.c
+++ b/drivers/mtd/maps/l440gx.c
@@ -27,17 +27,21 @@ static struct mtd_info *mymtd;
/* Is this really the vpp port? */
+static DEFINE_SPINLOCK(l440gx_vpp_lock);
+static ... |
876fe76d793d03077eb61ba3afab4a383f46c554 | Analyze and fix the following issue in the Linux kernel code: mtd: maps: physmap: Add reference counter to set_vpp() | Problem Details:
This patch is part of a set which fixes unnecessary flash erase and write errors
resulting from the MTD CFI driver turning off vpp while an erase is in progress.
This patch allows physmap_set_vpp() calls to be nested by adding a reference
counter.
omap1_set_vpp() already used a reference counter. Sinc... | ```diff
diff --git a/arch/arm/mach-omap1/flash.c b/arch/arm/mach-omap1/flash.c
index 1749cb37dda0..4665bfcd2ce9 100644
--- a/arch/arm/mach-omap1/flash.c
+++ b/arch/arm/mach-omap1/flash.c
@@ -15,20 +15,12 @@
void omap1_set_vpp(struct platform_device *pdev, int enable)
{
- static int count;
u32 l;
- if (enable) {... |
e7d9377e0440c25805dcc5b0af189a87beb69f5e | Analyze and fix the following issue in the Linux kernel code: mtd: chips: cfi_cmdset_0002: Match ENABLE_VPP()/DISABLE_VPP() calls | Problem Details:
This patch is part of a set which fixes unnecessary flash erase and write errors
resulting from the MTD CFI driver turning off vpp while an erase is in progress.
This patch ensures that only those flash operations which call ENABLE_VPP() can
then call DISABLE_VPP(). Other operations should never call D... | ```diff
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
index c1d4624ce6e7..d02592e6a0f0 100644
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -774,8 +774,6 @@ static void put_chip(struct map_info *map, struct flchip *chip, unsigned long ad
... |
85e5b2f2986310f2f75069c360669f6ce8e2ceb9 | Analyze and fix the following issue in the Linux kernel code: mtd: chips: cfi_cmdset_0001: Match ENABLE_VPP()/DISABLE_VPP() calls | Problem Details:
This patch is part of a set which fixes unnecessary flash erase and write errors
resulting from the MTD CFI driver turning off vpp while an erase is in progress.
This patch ensures that only those flash operations which call ENABLE_VPP() can
then call DISABLE_VPP(). Other operations should never call D... | ```diff
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
index 920b474a5613..bfee5b3a9217 100644
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -1017,8 +1017,6 @@ static void put_chip(struct map_info *map, struct flchip *chip, unsigned long a... |
994c8409c4591983898182bfb5a0368d3daf1fc1 | Analyze and fix the following issue in the Linux kernel code: mtd: fix partition wrapper functions | Problem Details:
This patch reverts a change that may have been mistakenly included with the set
of patches that introduced the new mtd api entry functions. Or perhaps I am
mistaken :)
The problem is in the partition wrapper functions, where the calls to the driver
methods were replaced with calls to the new mtd api ... | ```diff
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index 33d32c6f4f58..226d28a618d8 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -65,7 +65,8 @@ static int part_read(struct mtd_info *mtd, loff_t from, size_t len,
int res;
stats = part->master->ecc_stats;
- res = mtd_read(part->... |
9bbf29e4757fb152c8673eda0b1e9d507b953df9 | Analyze and fix the following issue in the Linux kernel code: jffs2: Standardize JFFS_<LEVEL> uses | Problem Details:
Use pr_<level> to prefix KBUILD_MODNAME via pr_fmt.
Remove obfuscating defines and use constants in pr_<level>
No need for a do {} while (0) for single statements.
Form of JFFS_<LEVEL> output changes from
"JFFS2 notice: " to "jffs2: notice: "
Added pr_fmt to xattr.c
Signed-off-by: Joe Perches <joe@... | ```diff
diff --git a/fs/jffs2/debug.c b/fs/jffs2/debug.c
index f8a99a371508..1090eb64b90d 100644
--- a/fs/jffs2/debug.c
+++ b/fs/jffs2/debug.c
@@ -267,7 +267,7 @@ void __jffs2_dbg_superblock_counts(struct jffs2_sb_info *c)
do { \
if (sz != c->sz##_size) { \
pr_warn("%s_size mismatch counted 0x%x, c->%... |
5a528957e7c74f1fed73fe20424b7a3421658877 | Analyze and fix the following issue in the Linux kernel code: jffs2: Use pr_fmt and remove jffs: from formats | Problem Details:
Use pr_fmt to prefix KBUILD_MODNAME to appropriate logging messages.
Remove now unnecessary internal prefixes from formats.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> | ```diff
diff --git a/fs/jffs2/acl.c b/fs/jffs2/acl.c
index 926d02068a14..922f146e4235 100644
--- a/fs/jffs2/acl.c
+++ b/fs/jffs2/acl.c
@@ -9,6 +9,8 @@
*
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/fs.h>
diff --git a/fs/jffs2/background.c b... |
921de864b7c6413f15224d8f5e677541e8e1ac6d | Analyze and fix the following issue in the Linux kernel code: mxs-dma : rewrite the last parameter of mxs_dma_prep_slave_sg() | Problem Details:
[1] Background :
The GPMI does ECC read page operation with a DMA chain consist of three DMA
Command Structures. The middle one of the chain is used to enable the BCH,
and read out the NAND page.
The WAIT4END(wait for command end) is a comunication signal between
the GPMI and MXS-D... | ```diff
diff --git a/drivers/dma/mxs-dma.c b/drivers/dma/mxs-dma.c
index 0afcedbe2471..0ddfd30b56ad 100644
--- a/drivers/dma/mxs-dma.c
+++ b/drivers/dma/mxs-dma.c
@@ -349,10 +349,32 @@ static void mxs_dma_free_chan_resources(struct dma_chan *chan)
clk_disable_unprepare(mxs_dma->clk);
}
+/*
+ * How to use the flags... |
342d3a93e2b191b0ada07ba7c48380181c9214e8 | Analyze and fix the following issue in the Linux kernel code: mtd: fix 'Flash device refused suspend due to active operation' message | Problem Details:
While debugging on SA11x0, the following message was observed:
"Flash device refused suspend due to active operation (state 20)"
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse... | ```diff
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
index 2d9669047ed4..920b474a5613 100644
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -2479,7 +2479,7 @@ static int cfi_intelext_suspend(struct mtd_info *mtd)
allowed to. Or sho... |
492b8bde2c2badd3e5845f2e8de6fa9065438743 | Analyze and fix the following issue in the Linux kernel code: mtd: gpmi: fix compiler warning | Problem Details:
The gpmi driver selects the MTD_CMDLINE_PARTS directly.
But we should not select a visible symbol.
Just remove the select.
Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> | ```diff
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 59d4363e1671..0ea7084eabdc 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -440,7 +440,6 @@ config MTD_NAND_NANDSIM
config MTD_NAND_GPMI_NAND
bool "GPMI NAND Flash Controller driver"
depends on MTD_... |
4de034787251e872f5eded7cfeb3fde094da633a | Analyze and fix the following issue in the Linux kernel code: jffs2: Fix typo in compr.c | Problem Details:
Correct spelling "modul" to "module" in
fs/hffs2/compr.c
Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> | ```diff
diff --git a/fs/jffs2/compr.c b/fs/jffs2/compr.c
index 5b6c9d1a2fb9..96ed3c9ec3fc 100644
--- a/fs/jffs2/compr.c
+++ b/fs/jffs2/compr.c
@@ -340,7 +340,7 @@ int jffs2_unregister_compressor(struct jffs2_compressor *comp)
if (comp->usecount) {
spin_unlock(&jffs2_compressor_list_lock);
- printk(KERN_WARNING ... |
a3c1e3b732b3708a80e4035b9d845f3f7c7dd0c9 | Analyze and fix the following issue in the Linux kernel code: mtd: ixp4xx: oops in ixp4xx_flash_probe | Problem Details:
In commit "c797533 mtd: abstract last MTD partition parser argument" the
third argument of "mtd_device_parse_register()" changed from start address
of the MTD device to a pointer to a struct.
The "ixp4xx_flash_probe()" function was not converted properly, causing
an oops during boot.
This patch fixes... | ```diff
diff --git a/drivers/mtd/maps/ixp4xx.c b/drivers/mtd/maps/ixp4xx.c
index 8b5410162d70..e864fc6c58f9 100644
--- a/drivers/mtd/maps/ixp4xx.c
+++ b/drivers/mtd/maps/ixp4xx.c
@@ -182,6 +182,9 @@ static int ixp4xx_flash_probe(struct platform_device *dev)
{
struct flash_platform_data *plat = dev->dev.platform_data... |
79186876441278e7276d335448a4cb47fc4c1d8e | Analyze and fix the following issue in the Linux kernel code: mtd: mtdconcat: return -EOPNOTSUPP if block_markbad is undefined | Problem Details:
The main 'mtd_block_markbad()' function returns -EOPNOTSUPP if the
'->block_markbad' method is undefined, and mtdconcat should do the same.
Fix this by simply removing the 'mtd_can_have_bb()' because it is not
really necessary. It could be treated as an optimization, but this function is
expected to b... | ```diff
diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c
index 5c7eb69c4ed9..d826a8a50e73 100644
--- a/drivers/mtd/mtdconcat.c
+++ b/drivers/mtd/mtdconcat.c
@@ -673,9 +673,6 @@ static int concat_block_markbad(struct mtd_info *mtd, loff_t ofs)
struct mtd_concat *concat = CONCAT(mtd);
int i, err = -EINV... |
2c4ae276b13114a2c7ebac31257db391b4bf2b6f | Analyze and fix the following issue in the Linux kernel code: mtd: docg4: fix printk() warnings | Problem Details:
Gcc complains here:
drivers/mtd/nand/docg4.c: In function ‘probe_docg4’:
drivers/mtd/nand/docg4.c:1277:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘resource_size_t’ [-Wformat]
drivers/mtd/nand/docg4.c:1277:4: warning: format ‘%x’ expects argument of type ‘un... | ```diff
diff --git a/drivers/mtd/nand/docg4.c b/drivers/mtd/nand/docg4.c
index baae75b37d7e..9b3a64904668 100644
--- a/drivers/mtd/nand/docg4.c
+++ b/drivers/mtd/nand/docg4.c
@@ -1270,9 +1270,7 @@ static int __init probe_docg4(struct platform_device *pdev)
virtadr = ioremap(r->start, resource_size(r));
if (!virta... |
3e3417402b3bcaf0faf7995d426b848d7aa17c6e | Analyze and fix the following issue in the Linux kernel code: jffs2: fix typo in scan.c | Problem Details:
Correct spelling "scaning" to scanning" in
fs/jffs2/scan.c
Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> | ```diff
diff --git a/fs/jffs2/scan.c b/fs/jffs2/scan.c
index c02737375854..a06d47a688c7 100644
--- a/fs/jffs2/scan.c
+++ b/fs/jffs2/scan.c
@@ -366,7 +366,7 @@ static int jffs2_scan_xattr_node(struct jffs2_sb_info *c, struct jffs2_erasebloc
if (jffs2_sum_active())
jffs2_sum_add_xattr_mem(s, rx, ofs - jeb->offset)... |
a6c22850d20273896e7c8ee996730ccf2ba60a22 | Analyze and fix the following issue in the Linux kernel code: jffs2: update to new MTD interface | Problem Details:
There were a few instances of the old MTD interface remaining for JFFS2. We
fix one error that shows up (only when CONFIG_JFFS2_FS_WRITEBUFFER is not
defined) like this:
fs/jffs2/read.c: In function 'jffs2_read_dnode':
fs/jffs2/read.c:36:8: error: 'struct mtd_info' has no member named 'read'
fs/... | ```diff
diff --git a/fs/jffs2/os-linux.h b/fs/jffs2/os-linux.h
index ab65ee3ec858..1cd3aec9d9ae 100644
--- a/fs/jffs2/os-linux.h
+++ b/fs/jffs2/os-linux.h
@@ -76,7 +76,7 @@ static inline void jffs2_init_inode_info(struct jffs2_inode_info *f)
#define jffs2_write_nand_cleanmarker(c,jeb) (-EIO)
#define jffs2_flash_wri... |
41515ca262d5b75220f48afd21214dbe3ccfef8c | Analyze and fix the following issue in the Linux kernel code: mtd: sa11x0: Remove shutdown handler | Problem Details:
Commit c4a9f88daf ([MTD] [NOR] fix ctrl-alt-del can't reboot for
intel flash bug) interferes with this work-around, causing MTD to
issue this warning:
Flash device refused suspend due to active operation (state 0)
The commit makes our work-around in the map driver unnecessary, so
let's remove it.
S... | ```diff
diff --git a/drivers/mtd/maps/sa1100-flash.c b/drivers/mtd/maps/sa1100-flash.c
index 502821997707..c7355692ea85 100644
--- a/drivers/mtd/maps/sa1100-flash.c
+++ b/drivers/mtd/maps/sa1100-flash.c
@@ -373,21 +373,9 @@ static int __exit sa1100_mtd_remove(struct platform_device *pdev)
return 0;
}
-#ifdef CONFI... |
cdbec0508699e3346052bf098c5c330a711a86a9 | Analyze and fix the following issue in the Linux kernel code: mtd: nand: fix SCAN2NDPAGE check for BBM | Problem Details:
nand_block_bad() doesn't check the correct pages when
NAND_BBT_SCAN2NDPAGE is enabled. It should scan both the OOB region of
both the 1st and 2nd page of each block.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-... | ```diff
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index cd827d5a8255..7855fd2d5c60 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -338,7 +338,7 @@ static int nand_verify_buf16(struct mtd_info *mtd, const uint8_t *buf, int len)
*/
static int nand_block_b... |
335a5f409ee3960bda6b112b9d1a89d0a4e0a7eb | Analyze and fix the following issue in the Linux kernel code: mtd: mtdcore: Fix build warning when CONFIG_MTD_CHAR is not defined | Problem Details:
Fix the following build warning:
drivers/mtd/mtdcore.c: In function ‘mtd_release’:
drivers/mtd/mtdcore.c:110: warning: unused variable ‘mtd’
This happens when neither CONFIG_MTD_CHAR nor CONFIG_MTD_CHAR_MODULE are defined.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Art... | ```diff
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index 9a9ce71a71fc..de96865b4f96 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -107,7 +107,7 @@ static LIST_HEAD(mtd_notifiers);
*/
static void mtd_release(struct device *dev)
{
- struct mtd_info *mtd = dev_get_drvdata(dev);
+ st... |
2ff5e1532dd37e1bd8ac72da3f7f0e2b310102fb | Analyze and fix the following issue in the Linux kernel code: mtd: pmc551: fix signedness bug in init_pmc551() | Problem Details:
Since "length" is a u32, the error handling below didn't work when
fixup_pmc551() returns -ENODEV.
if ((length = fixup_pmc551(PCI_Device)) <= 0)
This patch changes both the type of "length" and the return type of
fixup_pmc551() to int.
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Artem... | ```diff
diff --git a/drivers/mtd/devices/pmc551.c b/drivers/mtd/devices/pmc551.c
index ecff765579dd..cfccf6510411 100644
--- a/drivers/mtd/devices/pmc551.c
+++ b/drivers/mtd/devices/pmc551.c
@@ -359,7 +359,7 @@ static int pmc551_write(struct mtd_info *mtd, loff_t to, size_t len,
* mechanism
* returns the size of th... |
727011e07cbdf87772fcc1999cccd15cc915eb62 | Analyze and fix the following issue in the Linux kernel code: Btrfs: allow metadata blocks larger than the page size | Problem Details:
A few years ago the btrfs code to support blocks lager than
the page size was disabled to fix a few corner cases in the
page cache handling. This fixes the code to properly support
large metadata blocks again.
Since current kernels will crash early and often with larger
metadata blocks, this adds an ... | ```diff
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index edccc948e877..85ab1c5844a2 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -137,6 +137,12 @@ struct btrfs_ordered_sum;
#define BTRFS_EMPTY_SUBVOL_DIR_OBJECTID 2
+/*
+ * the max metadata block size. This limit is somewhat artificial,
+ * but th... |
f2791d733a2f06997b573d1a3cfde21e6f529826 | Analyze and fix the following issue in the Linux kernel code: PM / Runtime: don't forget to wake up waitqueue on failure | Problem Details:
This patch (as1535) fixes a bug in the runtime PM core. When a
runtime suspend attempt completes, whether successfully or not, the
device's power.wait_queue is supposed to be signalled. But this
doesn't happen in the failure pathway of rpm_suspend() when another
autosuspend attempt is rescheduled. A... | ```diff
diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c
index 541f821d4ea6..bd0f3949bcf9 100644
--- a/drivers/base/power/runtime.c
+++ b/drivers/base/power/runtime.c
@@ -532,6 +532,8 @@ static int rpm_suspend(struct device *dev, int rpmflags)
dev->power.suspend_time = ktime_set(0, 0);
dev->... |
9aaf440f8fabcebf9ea79a62ccf4c212e6544b49 | Analyze and fix the following issue in the Linux kernel code: modpost: fix ALL_INIT_DATA_SECTIONS | Problem Details:
This was lacking a comma between two supposed to be separate strings.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Michal Marek <mmarek@suse.cz> | ```diff
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 2bd594e6d1b4..159b4cc084fd 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -849,7 +849,7 @@ static void check_section(const char *modname, struct elf_info *elf,
#define ALL_INIT_DATA_SECTIONS \
".init.setup$", ".init.rodata$... |
e47bb0bda46bf50f81671db502d0c903e0a32604 | Analyze and fix the following issue in the Linux kernel code: x86, efi: Fix NumberOfRvaAndSizes field in PE32 header for EFI_STUB | Problem Details:
We've actually got six data directories in the header, not one. Even
though the firmware loader doesn't seem to mind, when we come to sign
the kernel image the signing tool thinks that there is no Certificate
Table data directory, even though we've allocated space for one.
Signed-off-by: Matt Fleming ... | ```diff
diff --git a/arch/x86/boot/header.S b/arch/x86/boot/header.S
index 4ceb56e9a4ce..8bbea6aa40d9 100644
--- a/arch/x86/boot/header.S
+++ b/arch/x86/boot/header.S
@@ -189,7 +189,7 @@ extra_header_fields:
.quad 0 # SizeOfHeapCommit
#endif
.long 0 # LoaderFlags
- .long 0x1 # NumberOfRvaAndSizes
+ .long ... |
e31be363df3092821bf179cf4baa076f501b8ae6 | Analyze and fix the following issue in the Linux kernel code: x86, efi: Fix .text section overlapping image header for EFI_STUB | Problem Details:
This change modifes the PE .text section to start after
the first sector of the kernel image.
The header may be modified by the UEFI secure boot signing,
so it is not appropriate for it to be included in one of the
image sections. Since the sections are part of the secure
boot hash, this modification ... | ```diff
diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c
index fec216f4fbc3..01cbb8707a31 100644
--- a/arch/x86/boot/compressed/eboot.c
+++ b/arch/x86/boot/compressed/eboot.c
@@ -904,11 +904,19 @@ struct boot_params *efi_main(void *handle, efi_system_table_t *_table)
memset(boot_para... |
2e064b1e131eba262c0ba4268cb79dbc72edeece | Analyze and fix the following issue in the Linux kernel code: x86, efi: Fix issue of overlapping .reloc section for EFI_STUB | Problem Details:
Previously the .reloc section was embedded in the .text
section.
No relocations are required during the PE/COFF loading phase
for the kernel using the EFI_STUB UEFI loader. To fix the
issue of overlapping sections, create a .reloc section with a
zero length.
The .reloc section header must exist to ma... | ```diff
diff --git a/arch/x86/boot/header.S b/arch/x86/boot/header.S
index f1bbeeb09148..4e9124b148c2 100644
--- a/arch/x86/boot/header.S
+++ b/arch/x86/boot/header.S
@@ -217,18 +217,17 @@ section_table:
#
# The EFI application loader requires a relocation section
- # because EFI applications are relocatable and ... |
41603e9783a24c8c7cce548c0819bdc9e46a585b | Analyze and fix the following issue in the Linux kernel code: drivers/platform/x86/amilo-rfkill.c::amilo_rfkill_probe() avoid NULL deref | Problem Details:
In drivers/platform/x86/amilo-rfkill.c::amilo_rfkill_probe() the call
to dmi_first_match() may fail and return NULL. If it does return NULL,
then we'll be dereferencing a NULL pointer in the rfkill_alloc() call
where we do 'system_id->driver_data' --> KABOOM!
Avoid that problem by testing for a NULL r... | ```diff
diff --git a/drivers/platform/x86/amilo-rfkill.c b/drivers/platform/x86/amilo-rfkill.c
index 19170bb7700b..a514bf66fdd7 100644
--- a/drivers/platform/x86/amilo-rfkill.c
+++ b/drivers/platform/x86/amilo-rfkill.c
@@ -97,9 +97,12 @@ static struct rfkill *amilo_rfkill_dev;
static int __devinit amilo_rfkill_probe... |
643c61e119459e9d750087b7b34be94491efebf9 | Analyze and fix the following issue in the Linux kernel code: rtlwifi: rtl8192ce: rtl8192cu: rtl8192de: Fix low-gain setting when scanning | Problem Details:
In https://bugzilla.redhat.com/show_bug.cgi?id=770207, slowdowns of driver
rtl8192ce are reported. One fix (commit a9b89e2) has already been applied,
and it helped, but the maximum RX speed would still drop to 1 Mbps. As in
the previous fix, the initial gain was determined to be the problem; however,
t... | ```diff
diff --git a/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c b/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c
index 1eec3a06d1f3..4c016241f340 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c
@@ -1893,7 +1893,7 @@ void rtl92c_phy_set... |
d72308bff5c2fa207949a5925b020bce74495e33 | Analyze and fix the following issue in the Linux kernel code: mac80211: fix possible tid_rx->reorder_timer use after free | Problem Details:
Is possible that we will arm the tid_rx->reorder_timer after
del_timer_sync() in ___ieee80211_stop_rx_ba_session(). We need to stop
timer after RCU grace period finish, so move it to
ieee80211_free_tid_rx(). Timer will not be armed again, as
rcu_dereference(sta->ampdu_mlme.tid_rx[tid]) will return NULL... | ```diff
diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c
index 1068f668ac4e..64d3ce5ea1a0 100644
--- a/net/mac80211/agg-rx.c
+++ b/net/mac80211/agg-rx.c
@@ -49,6 +49,8 @@ static void ieee80211_free_tid_rx(struct rcu_head *h)
container_of(h, struct tid_ampdu_rx, rcu_head);
int i;
+ del_timer_sync(&tid_r... |
4e808a38fdcaeeeddbc05942623279ebe7c02373 | Analyze and fix the following issue in the Linux kernel code: rt2x00: rt2800usb: fix status register reread logic | Problem Details:
Another good catch from Jakub Kicinski. This patch fixes my
recent commit: ed61e2b02027935520d1be884fac0b2ffce8379a
"rt2x00: rt2800usb: rework txdone code"
We should reread status register only when nobody else start already
reading status i.e. test_and_set_bit(TX_STATUS_READING, flags) return 0.
Rep... | ```diff
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index f97f84606f56..001735f7a661 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -184,7 +184,7 @@ stop_reading:
* here again if status reading is needed.
*/
... |
b9fc106108f3faf2e4430c3bd5721677c3d6a4a1 | Analyze and fix the following issue in the Linux kernel code: rt2x00: rt2800usb: schedule txdone work on timeout | Problem Details:
This is fix for my current commit
ed61e2b02027935520d1be884fac0b2ffce8379a
"rt2x00: rt2800usb: rework txdone code"
We should schedule txdone work on timeout, otherwise if newer get
tx status from hardware, we will never report tx status to mac80211
and eventually never wakeup tx queue.
Reported-by: J... | ```diff
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index cd490abced91..f97f84606f56 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -163,7 +163,13 @@ static bool rt2800usb_tx_sta_fifo_read_completed(struct rt2x00_d... |
b5447ff92b5169eab843a76d83e98d0cd7b7f5b6 | Analyze and fix the following issue in the Linux kernel code: ath9k: fix a memory leak in ath_rx_tasklet() | Problem Details:
commit 0d95521ea7 (ath9k: use split rx buffers to get rid of order-1 skb
allocations) added in memory leak in error path.
sc->rx.frag should be cleared after the pskb_expand_head() call, or else
we jump to requeue_drop_frag and leak an skb.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Jou... | ```diff
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
index f4ae3ba994a8..1c4583c7ff7c 100644
--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
@@ -1913,13 +1913,13 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
if (s... |
e92109be7a6a04808c3ed586475ba1e5ea56ecbd | Analyze and fix the following issue in the Linux kernel code: iwlegacy: fix BSSID setting | Problem Details:
Current commit 0775f9f90cdaf40fbf69b3192b3dddb2b3436f45
"mac80211: remove spurious BSSID change flag" exposed bug on iwlegacy,
that we do not set BSSID address correctly and then device was not able
to receive frames after successful associate.
On the way fix scan canceling comment. Apparently ->post_... | ```diff
diff --git a/drivers/net/wireless/iwlegacy/common.c b/drivers/net/wireless/iwlegacy/common.c
index 6a692a534ffc..eaf249452e51 100644
--- a/drivers/net/wireless/iwlegacy/common.c
+++ b/drivers/net/wireless/iwlegacy/common.c
@@ -5288,9 +5288,9 @@ il_mac_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_v... |
2ee0a07028d2cde6e131b73f029dae2b93c50f3a | Analyze and fix the following issue in the Linux kernel code: ath9k: fix max noise floor threshold | Problem Details:
Currently the maximum noise floor limit is set as too high (-60dB). The
assumption of having a higher threshold limit is that it would help
de-sensitize the receiver (reduce phy errors) from continuous
interference. But when we have a bursty interference where there are
collisions and then free air tim... | ```diff
diff --git a/drivers/net/wireless/ath/ath9k/calib.c b/drivers/net/wireless/ath/ath9k/calib.c
index 2f4b48e6fb03..e5cceb077574 100644
--- a/drivers/net/wireless/ath/ath9k/calib.c
+++ b/drivers/net/wireless/ath/ath9k/calib.c
@@ -20,7 +20,6 @@
/* Common calibration code */
-#define ATH9K_NF_TOO_HIGH -60
st... |
883a649b737cdbe3ede7e50f3f939fd706ed5c4e | Analyze and fix the following issue in the Linux kernel code: iwlegacy: do not nulify il->vif on reset | Problem Details:
This il->vif is dereferenced in different part of iwlegacy code, so do
not nullify it. This should fix random crashes observed in companion
with microcode errors i.e. crash in il3945_config_ap().
Additionally this should address also
WARNING: at drivers/net/wireless/iwlegacy/common.c:4656 il_mac_remov... | ```diff
diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c
index 0c1209390169..faec40467208 100644
--- a/drivers/net/wireless/iwlegacy/3945-mac.c
+++ b/drivers/net/wireless/iwlegacy/3945-mac.c
@@ -2673,8 +2673,6 @@ il3945_bg_restart(struct work_struct *data)
if (test_an... |
82c333aaf4b2d6a83d9e8d6247584af8c18c4d7b | Analyze and fix the following issue in the Linux kernel code: drivers, samsung-laptop: fix usage of isalnum | Problem Details:
linux/ctype.h is needed for isalnum() to avoid a build error:
drivers/platform/x86/samsung-laptop.c: In function ‘samsung_sabi_diag’:
drivers/platform/x86/samsung-laptop.c:1306: error: implicit declaration of function ‘isalnum’
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Corent... | ```diff
diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c
index b7c67c87f47b..d1142e317433 100644
--- a/drivers/platform/x86/samsung-laptop.c
+++ b/drivers/platform/x86/samsung-laptop.c
@@ -25,6 +25,7 @@
#include <linux/acpi.h>
#include <linux/seq_file.h>
#include <linux/debu... |
8522944085ffd83af129ffce06e3a9f34635391c | Analyze and fix the following issue in the Linux kernel code: drivers, samsung-laptop: fix initialization of sabi_data in sabi_set_commandb | Problem Details:
Fields d0, d1, d2, and d3 are members of an anonymous struct inside an
anonymous union inside struct sabi_data. Initialization must be done by
wrapping the anonymous union and structs with brackets to avoid a build
error:
drivers/platform/x86/samsung-laptop.c: In function ‘sabi_set_commandb’:
drivers... | ```diff
diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c
index 7d7109fdbd63..b7c67c87f47b 100644
--- a/drivers/platform/x86/samsung-laptop.c
+++ b/drivers/platform/x86/samsung-laptop.c
@@ -430,7 +430,7 @@ exit:
static int sabi_set_commandb(struct samsung_laptop *samsung,
... |
996d23ba36a0e505744a047d2138e189c64c6619 | Analyze and fix the following issue in the Linux kernel code: acer-wmi: fix out of input parameter size when set | Problem Details:
The input parameter of set device status is different with get device
status. There have volume value element for set status but don't need
for get action.
On Acer TravelMate 4750 creates field on volume value element even
doesn't use it in DSDT. So, add this patch for separate input paramter
between ... | ```diff
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
index cb7e841582d9..c31664438e76 100644
--- a/drivers/platform/x86/acer-wmi.c
+++ b/drivers/platform/x86/acer-wmi.c
@@ -159,7 +159,14 @@ struct lm_return_value {
u16 reserved;
} __attribute__((packed));
-struct wmid3_gds_input_p... |
fa30c964c0ac31a705a4f86072267a42343c4158 | Analyze and fix the following issue in the Linux kernel code: perf tools: Fix bug in raw sample parsing | Problem Details:
In perf_event__parse_sample(), the array variable was not incremented
by the amount of data used by the raw_data.
That was okay until we added PERF_SAMPLE_BRANCH_STACK which depends on
the array variable pointing to the beginning of the branch stack data.
But that was not the case if branch stack was... | ```diff
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index d9da62a7234f..8c13dbcb84b9 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -580,6 +580,8 @@ int perf_event__parse_sample(const union perf_event *event, u64 type,
return -EFAULT;
data->raw_data = (void *) pdata;
+... |
6d4818c5245fe00bee2c3bfb45edde178f302703 | Analyze and fix the following issue in the Linux kernel code: perf tools: Fix display of first level of callchains | Problem Details:
The callchain stdio mode display was written using a sorted by symbol
report. In this mode we have only one callchain root per hist so we
forgot to handle cases where we have multiple callchain root, as in per
dso sorting for example.
Fix this by handling these roots like any other branch, with the hi... | ```diff
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index c61235f81260..2ec4b60aff6c 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -607,7 +607,7 @@ static void init_rem_hits(void)
rem_hits.ms.sym = rem_sq_bracket;
}
-static size_t __callchain__fprintf_graph(FILE *fp, struct c... |
eb4168158f79237498e4d3ddcef6e9436db15a4a | Analyze and fix the following issue in the Linux kernel code: regulator: Fix restoring pmic.dcdcx_hib_mode settings in wm8350_dcdc_set_suspend_enable | Problem Details:
What we want is to restore wm8350->pmic.dcdcx_hib_mode settings to
WM8350_DCDCx_LOW_POWER registers. Current code also clears all other
bits of WM8350_DCDCx_LOW_POWER registers which is wrong.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> | ```diff
diff --git a/drivers/regulator/wm8350-regulator.c b/drivers/regulator/wm8350-regulator.c
index ab1e183a74b5..1c548218e12a 100644
--- a/drivers/regulator/wm8350-regulator.c
+++ b/drivers/regulator/wm8350-regulator.c
@@ -495,25 +495,25 @@ static int wm8350_dcdc_set_suspend_enable(struct regulator_dev *rdev)
va... |
5777d9b34aec841429ddade56403b3f53a821a1d | Analyze and fix the following issue in the Linux kernel code: regulator: Fix unbalanced lock/unlock in mc13892_regulator_probe error path | Problem Details:
We do not hold a lock while registering regulator, thus should not call unlock
if regulator_register fails.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> | ```diff
diff --git a/drivers/regulator/mc13892-regulator.c b/drivers/regulator/mc13892-regulator.c
index e8cfc99dd8f0..845aa2263b8a 100644
--- a/drivers/regulator/mc13892-regulator.c
+++ b/drivers/regulator/mc13892-regulator.c
@@ -552,7 +552,7 @@ static int __devinit mc13892_regulator_probe(struct platform_device *pdev... |
09bf14b901f2c1908b6a72fe934457acdd1fa430 | Analyze and fix the following issue in the Linux kernel code: regulator: Fix set and get current limit for wm831x_buckv | Problem Details:
WM831X_DC1_HC_THR_MASK is 0x0070.
We need to do proper shift for setting and getting current limit.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> | ```diff
diff --git a/drivers/regulator/wm831x-dcdc.c b/drivers/regulator/wm831x-dcdc.c
index 4904a40b0d46..3044001f3cf6 100644
--- a/drivers/regulator/wm831x-dcdc.c
+++ b/drivers/regulator/wm831x-dcdc.c
@@ -386,7 +386,8 @@ static int wm831x_buckv_set_current_limit(struct regulator_dev *rdev,
if (i == ARRAY_SIZE(wm831... |
5ae2b822e4dc2219e9544fec3be53de699ea0f56 | Analyze and fix the following issue in the Linux kernel code: ab8500_fg: Fix some build warnings on x86_64 | Problem Details:
Noticed the following warnings:
CC drivers/power/ab8500_fg.o
drivers/power/ab8500_fg.c: In function 'charge_full_store':
drivers/power/ab8500_fg.c:2258:2: warning: format '%d' expects argument of type 'int', but argument 4 has type 'ssize_t' [-Wformat]
drivers/power/ab8500_fg.c: In function ‘ch... | ```diff
diff --git a/drivers/power/ab8500_fg.c b/drivers/power/ab8500_fg.c
index eaf149ecb74b..c22f2f05657e 100644
--- a/drivers/power/ab8500_fg.c
+++ b/drivers/power/ab8500_fg.c
@@ -2255,7 +2255,7 @@ static ssize_t charge_full_store(struct ab8500_fg *di, const char *buf,
ret = strict_strtoul(buf, 10, &charge_full)... |
6e0e60cd0d688d0d1af85ef2abb8e363595af988 | Analyze and fix the following issue in the Linux kernel code: max17042_battery: Fix CHARGE_FULL representation. | Problem Details:
CHARGE_FULL should represent the full capacity of the battery in uAh.
The 0x10 (FullCAP) register shows the compensated full capacity in
mAh * 2; e.g., reg(0x10) = 0xBB8 means that it is 1500mAh.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@lin... | ```diff
diff --git a/drivers/power/max17042_battery.c b/drivers/power/max17042_battery.c
index 5474e76d36fb..d576912b1219 100644
--- a/drivers/power/max17042_battery.c
+++ b/drivers/power/max17042_battery.c
@@ -179,14 +179,11 @@ static int max17042_get_property(struct power_supply *psy,
val->intval = ret >> 8;
br... |
df58c04c9f4182f979973a06ce40b44a5b84aeb5 | Analyze and fix the following issue in the Linux kernel code: charger-manager: Simplify charger_get_property(), get rid of a warning | Problem Details:
This patch fixes the following warning and makes the code a little
bit more simpler:
CC drivers/power/charger-manager.o
charger-manager.c: In function 'charger_get_property':
charger-manager.c:429:15: warning: 'i' may be used uninitialized in this function [-Wuninitialized]
Signed-off-by: Anto... | ```diff
diff --git a/drivers/power/charger-manager.c b/drivers/power/charger-manager.c
index e610e6b46b5b..9eca9f1ff0ea 100644
--- a/drivers/power/charger-manager.c
+++ b/drivers/power/charger-manager.c
@@ -399,7 +399,8 @@ static int charger_get_property(struct power_supply *psy,
struct charger_manager *cm = containe... |
61bb5a780dd4f50aa4dc859c28f1e8820d763b42 | Analyze and fix the following issue in the Linux kernel code: da9052-battery: Fix a memory leak when unload the module | Problem Details:
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org> | ```diff
diff --git a/drivers/power/da9052-battery.c b/drivers/power/da9052-battery.c
index 07d5b36535d5..daf52a4b17bb 100644
--- a/drivers/power/da9052-battery.c
+++ b/drivers/power/da9052-battery.c
@@ -634,6 +634,7 @@ static int __devexit da9052_bat_remove(struct platform_device *pdev)
free_irq(bat->da9052->irq_bas... |
64eb9b02bfbbc2a53b6092cc12c1f42cc3261dbc | Analyze and fix the following issue in the Linux kernel code: ab8500: Turn unneeded global symbols into local ones | Problem Details:
The patch fixes the following sparse warning:
drivers/power/ab8500_charger.c:1619:6: warning: symbol 'ab8500_charger_detect_usb_type_work' was not declared. Should it be static?
drivers/power/abx500_chargalg.c:1709:24: warning: symbol 'abx500_chargalg_sysfs_ops' was not declared. Should it be static?
... | ```diff
diff --git a/drivers/power/ab8500_charger.c b/drivers/power/ab8500_charger.c
index a7217d6b52bd..e2b4accbec88 100644
--- a/drivers/power/ab8500_charger.c
+++ b/drivers/power/ab8500_charger.c
@@ -1616,7 +1616,7 @@ static void ab8500_charger_ac_work(struct work_struct *work)
*
* Detect the type of USB plugged... |
0fff22ee792aee95d6945f4ed1b10aeaea806bc8 | Analyze and fix the following issue in the Linux kernel code: ab8500_fg: Fix copy-paste error | Problem Details:
ab8500_fg_discharge_state_to() function should accept
'enum ab8500_fg_discharge_state' argument, not
'enum ab8500_fg_charge_state'.
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org> | ```diff
diff --git a/drivers/power/ab8500_fg.c b/drivers/power/ab8500_fg.c
index b7e12c8af8cd..0441f9d1b29f 100644
--- a/drivers/power/ab8500_fg.c
+++ b/drivers/power/ab8500_fg.c
@@ -1255,7 +1255,7 @@ static void ab8500_fg_charge_state_to(struct ab8500_fg *di,
}
static void ab8500_fg_discharge_state_to(struct ab850... |
d329129e9e10e3089550fd9bd692f67687503136 | Analyze and fix the following issue in the Linux kernel code: ab8500_btemp: Get rid of 'enum adc_therm' | Problem Details:
This is the same as abx500_adc_therm, but when the former is used,
the following warning flood pops up:
drivers/power/ab8500_btemp.c: In function 'ab8500_btemp_batctrl_volt_to_res':
ab8500_btemp.c:150:25: warning: comparison between 'enum abx500_adc_therm' and 'enum adc_therm' [-Wenum-compare]
ab8500_... | ```diff
diff --git a/drivers/power/ab8500_btemp.c b/drivers/power/ab8500_btemp.c
index 443bc7db30a0..d8bb99394ac0 100644
--- a/drivers/power/ab8500_btemp.c
+++ b/drivers/power/ab8500_btemp.c
@@ -147,7 +147,7 @@ static int ab8500_btemp_batctrl_volt_to_res(struct ab8500_btemp *di,
return (450000 * (v_batctrl)) / (1800... |
efd71c89a411d72f1e20d91e34f0779e0e0019b4 | Analyze and fix the following issue in the Linux kernel code: ab8500_charger: Convert to the new USB OTG calls | Problem Details:
This patch fixes the following build errors:
ab8500_charger.c: In function 'ab8500_charger_remove':
ab8500_charger.c:2519:2: error: implicit declaration of function 'otg_unregister_notifier' [-Werror=implicit-function-declaration]
ab8500_charger.c:2520:2: error: implicit declaration of function 'otg_p... | ```diff
diff --git a/drivers/power/ab8500_charger.c b/drivers/power/ab8500_charger.c
index bbc541a59a38..a7217d6b52bd 100644
--- a/drivers/power/ab8500_charger.c
+++ b/drivers/power/ab8500_charger.c
@@ -240,7 +240,7 @@ struct ab8500_charger {
struct work_struct usb_state_changed_work;
struct work_struct check_main_... |
d2c0077c54794d668b3639079a4262a52088d5e2 | Analyze and fix the following issue in the Linux kernel code: isp1704_charger: Fix probe error path | Problem Details:
We enable power, but don't disable it in case of an error.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org> | ```diff
diff --git a/drivers/power/isp1704_charger.c b/drivers/power/isp1704_charger.c
index b806667b59ae..cce6211b8053 100644
--- a/drivers/power/isp1704_charger.c
+++ b/drivers/power/isp1704_charger.c
@@ -470,6 +470,7 @@ fail0:
dev_err(&pdev->dev, "failed to register isp1704 with error %d\n", ret);
+ isp1704_ch... |
7336880e3d73ee38b0c2bb99674e7e79d87dd43e | Analyze and fix the following issue in the Linux kernel code: lp8727_charger: Fix wrong code style | Problem Details:
Definition of STATUS2
: remove space before tabs.
Return code of lp8727_is_dedicated_charger(), lp8727_is_usb_charger()
: remove parentheses when return is not a function.
MODULE_AUTHOR section
: remove space at the start of a line.
Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: A... | ```diff
diff --git a/drivers/power/lp8727_charger.c b/drivers/power/lp8727_charger.c
index 1e8a98b29d80..d5aab54eda11 100644
--- a/drivers/power/lp8727_charger.c
+++ b/drivers/power/lp8727_charger.c
@@ -26,7 +26,7 @@
#define INT1 0x4
#define INT2 0x5
#define STATUS1 0x6
-#define STATUS2 0x7
+#define STATUS2 0x7... |
7175f80ba38a6b056508c4eadaab829593abbf2b | Analyze and fix the following issue in the Linux kernel code: ARM: tegra: Include assembler.h in sleep.S to fix build break | Problem Details:
Commit 6f6f6a7 "ARM: create a common IOMEM definition" moved macro
IOMEM(), and requires users to include <asm/assembler.h>. Fix Tegra's
sleep.S to do so. This fixes:
arch/arm/mach-tegra/sleep.S: Assembler messages:
arch/arm/mach-tegra/sleep.S:77: Error: missing ')'
arch/arm/mach-tegra/sleep.S:77: Err... | ```diff
diff --git a/arch/arm/mach-tegra/sleep.S b/arch/arm/mach-tegra/sleep.S
index 8f9fde161c34..5b20197bae7f 100644
--- a/arch/arm/mach-tegra/sleep.S
+++ b/arch/arm/mach-tegra/sleep.S
@@ -23,7 +23,9 @@
*/
#include <linux/linkage.h>
-#include <mach/io.h>
+
+#include <asm/assembler.h>
+
#include <mach/iomap.h>
... |
f3f8014862d813cca81a597c83bd1dbf0fb2b8f6 | Analyze and fix the following issue in the Linux kernel code: nfsd: add the infrastructure to handle the cld upcall | Problem Details:
...and add a mechanism for switching between the "legacy" tracker and
the new one. The decision is made by looking to see whether the
v4recoverydir exists. If it does, then the legacy client tracker is
used.
If it's not, then the kernel will create a "cld" pipe in rpc_pipefs.
That pipe is used to talk... | ```diff
diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c
index e616f88b7f19..cec62ed2a064 100644
--- a/fs/nfsd/nfs4recover.c
+++ b/fs/nfsd/nfs4recover.c
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2004 The Regents of the University of Michigan.
+* Copyright (c) 2012 Jeff Layton <jlayton@redhat.com>
* All rights ... |
40abc2defbca6a6d7fde49082586430350d0a535 | Analyze and fix the following issue in the Linux kernel code: ath6kl: Optimize target power in deep sleep suspend | Problem Details:
Adding below steps helps to get good power numbers
in deep sleep suspend path,
* Disable WOW mode.
* Flush data packets and wait for all control packets.
to be cleared in TX path before deep sleep suspend.
* Set host sleep mode to SLEEP.
Below steps are added to perform the recovery... | ```diff
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index e3c4c404ba11..80910286d1b8 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -2130,6 +2130,77 @@ static int ath6kl_wow_resume(struct ath6kl *ar)
... |
055bde493fc9a41b6b3e45381b454c18e2045d5b | Analyze and fix the following issue in the Linux kernel code: ath6kl: Isolate host sleep mode config part from ath6kl_wow_suspend | Problem Details:
The piece of code used in ath6kk_wow_suspend function
to configure the host sleep mode is needed in deep sleep
case also.
Moving that portion to a separate function called
ath6kl_update_host_mode() would be helpful to avoid
the duplication of the same code in deep sleep path.
There is no functional c... | ```diff
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index 8b12ad6127d3..e3c4c404ba11 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -1924,12 +1924,61 @@ static int ath6kl_wow_sta(struct ath6kl *ar, stru... |
5c980fbb4e7ac2d01e95c3372e95ac40dacd33cd | Analyze and fix the following issue in the Linux kernel code: ath6kl: Dump htc header when invalid Rx frame length is detected | Problem Details:
Dump htc header along with the warning message when the request
to Rx with invalid frame length is detected.
kvalo: fix open parenthesis alignment
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> | ```diff
diff --git a/drivers/net/wireless/ath/ath6kl/htc.c b/drivers/net/wireless/ath/ath6kl/htc.c
index 4849d99cce77..5dfb7cc27aa3 100644
--- a/drivers/net/wireless/ath/ath6kl/htc.c
+++ b/drivers/net/wireless/ath/ath6kl/htc.c
@@ -1353,7 +1353,9 @@ static int ath6kl_htc_rx_setup(struct htc_target *target,
sizeof(... |
51579137c500362018b5341f5dca47807ed558aa | Analyze and fix the following issue in the Linux kernel code: regulator: tps6586x: Fix list minimal voltage setting for LDO0 | Problem Details:
According to the datasheet, LDO0 has minimal voltage 1.2V rather than 1.25V.
Table 3-39. VLDO0[2:0] Settings
VLDOx[2:0] VOUT (V) VLDOx[2:0] VOUT (V)
000 1.20 100 2.70
001 1.50 101 2.85
010 1.80 110 3.10
011 2.50 111 3.30
Signed-o... | ```diff
diff --git a/drivers/regulator/tps6586x-regulator.c b/drivers/regulator/tps6586x-regulator.c
index 29b615ce3aff..cfc1f16f7771 100644
--- a/drivers/regulator/tps6586x-regulator.c
+++ b/drivers/regulator/tps6586x-regulator.c
@@ -79,6 +79,11 @@ static int tps6586x_ldo_list_voltage(struct regulator_dev *rdev,
... |
88f50c80748bf5238c88e70ee26c68ac48b94e68 | Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: add htile support to the cs checker v3 | Problem Details:
For 6xx+. Required for mesa to use htile support for HiZ/HiS.
Userspace will check radeon version 2.14 with is bumped either
by tiling patch or stream out patch. This patch only add support
for htile relocation which should be enough for any userspace
to implement the hyperz (using htile buffer) featu... | ```diff
diff --git a/drivers/gpu/drm/radeon/evergreen_cs.c b/drivers/gpu/drm/radeon/evergreen_cs.c
index a58b37a2e65a..70089d32b80f 100644
--- a/drivers/gpu/drm/radeon/evergreen_cs.c
+++ b/drivers/gpu/drm/radeon/evergreen_cs.c
@@ -80,6 +80,9 @@ struct evergreen_cs_track {
bool cb_dirty;
bool db_dirty;
bool ... |
59365671464539dc695bbf4d4bf37aabfd8604f2 | Analyze and fix the following issue in the Linux kernel code: drm/nouveau/i2c: fix thinko/regression on really old chipsets | Problem Details:
Fixes i2c on my TNT2.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com> | ```diff
diff --git a/drivers/gpu/drm/nouveau/nouveau_i2c.c b/drivers/gpu/drm/nouveau/nouveau_i2c.c
index 8f4f914d9eab..e2be95af2e52 100644
--- a/drivers/gpu/drm/nouveau/nouveau_i2c.c
+++ b/drivers/gpu/drm/nouveau/nouveau_i2c.c
@@ -315,8 +315,8 @@ nouveau_i2c_init(struct drm_device *dev)
struct drm_nouveau_private *de... |
c8435362f2211086b34ce871fa9c3fcc7ca79ff9 | Analyze and fix the following issue in the Linux kernel code: drm/nouveau: default to 8bpc for non-LVDS panels if EDID isn't useful | Problem Details:
A few reports of bad behaviour since the autodetection defaulted to 6bpc,
lets fix this.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com> | ```diff
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c
index 8f510fd956b0..fa860358add1 100644
--- a/drivers/gpu/drm/nouveau/nouveau_connector.c
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
@@ -654,10 +654,13 @@ nouveau_connector_detect_depth(struct drm_conne... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.