Skip to content

Commit 6a8058c

Browse files
committed
Merge branch 'bits/002-backports' into asahi-wip
2 parents 26f6af4 + ab1d427 commit 6a8058c

5 files changed

Lines changed: 29 additions & 8 deletions

File tree

drivers/bus/simple-pm-bus.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,15 @@ static const struct of_device_id simple_pm_bus_of_match[] = {
142142
{ .compatible = "simple-mfd", .data = ONLY_BUS },
143143
{ .compatible = "isa", .data = ONLY_BUS },
144144
{ .compatible = "arm,amba-bus", .data = ONLY_BUS },
145+
{ .compatible = "apple,s5l8960x-pmgr", .data = ONLY_BUS },
146+
{ .compatible = "apple,t7000-pmgr", .data = ONLY_BUS },
147+
{ .compatible = "apple,s8000-pmgr", .data = ONLY_BUS },
148+
{ .compatible = "apple,t8010-pmgr", .data = ONLY_BUS },
149+
{ .compatible = "apple,t8015-pmgr", .data = ONLY_BUS },
150+
{ .compatible = "apple,t8103-pmgr", .data = ONLY_BUS },
151+
{ .compatible = "apple,t8112-pmgr", .data = ONLY_BUS },
152+
{ .compatible = "apple,t6000-pmgr", .data = ONLY_BUS },
153+
{ .compatible = "apple,t6020-pmgr", .data = ONLY_BUS },
145154
{ /* sentinel */ }
146155
};
147156
MODULE_DEVICE_TABLE(of, simple_pm_bus_of_match);

drivers/gpu/drm/tests/drm_exec_test.c

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,22 @@ static void test_prepare(struct kunit *test)
150150
static void test_prepare_array(struct kunit *test)
151151
{
152152
struct drm_exec_priv *priv = test->priv;
153-
struct drm_gem_object gobj1 = { };
154-
struct drm_gem_object gobj2 = { };
155-
struct drm_gem_object *array[] = { &gobj1, &gobj2 };
153+
struct drm_gem_object *gobj1;
154+
struct drm_gem_object *gobj2;
155+
struct drm_gem_object *array[] = {
156+
(gobj1 = kunit_kzalloc(test, sizeof(*gobj1), GFP_KERNEL)),
157+
(gobj2 = kunit_kzalloc(test, sizeof(*gobj2), GFP_KERNEL)),
158+
};
156159
struct drm_exec exec;
157160
int ret;
158161

159-
drm_gem_private_object_init(priv->drm, &gobj1, PAGE_SIZE);
160-
drm_gem_private_object_init(priv->drm, &gobj2, PAGE_SIZE);
162+
if (!gobj1 || !gobj2) {
163+
KUNIT_FAIL(test, "Failed to allocate GEM objects.\n");
164+
return;
165+
}
166+
167+
drm_gem_private_object_init(priv->drm, gobj1, PAGE_SIZE);
168+
drm_gem_private_object_init(priv->drm, gobj2, PAGE_SIZE);
161169

162170
drm_exec_init(&exec, DRM_EXEC_INTERRUPTIBLE_WAIT, 0);
163171
drm_exec_until_all_locked(&exec)
@@ -166,8 +174,8 @@ static void test_prepare_array(struct kunit *test)
166174
KUNIT_EXPECT_EQ(test, ret, 0);
167175
drm_exec_fini(&exec);
168176

169-
drm_gem_private_object_fini(&gobj1);
170-
drm_gem_private_object_fini(&gobj2);
177+
drm_gem_private_object_fini(gobj1);
178+
drm_gem_private_object_fini(gobj2);
171179
}
172180

173181
static void test_multiple_loops(struct kunit *test)

drivers/media/common/videobuf2/videobuf2-dma-sg.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@ static int vb2_dma_sg_mmap(void *buf_priv, struct vm_area_struct *vma)
345345
return err;
346346
}
347347

348+
vm_flags_set(vma, VM_DONTEXPAND | VM_DONTDUMP);
348349
/*
349350
* Use common vm_area operations to track buffer refcount.
350351
*/

drivers/mfd/macsmc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,7 @@ static int apple_smc_probe(struct platform_device *pdev)
413413
if (!smc)
414414
return -ENOMEM;
415415

416+
mutex_init(&smc->mutex);
416417
smc->dev = &pdev->dev;
417418
smc->sram_base = devm_platform_get_and_ioremap_resource(pdev, 1, &smc->sram);
418419
if (IS_ERR(smc->sram_base))

drivers/nvmem/core.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1618,12 +1618,14 @@ static void nvmem_shift_read_buffer_in_place(struct nvmem_cell_entry *cell, void
16181618
*p = *b++ >> bit_offset;
16191619

16201620
/* setup rest of the bytes if any */
1621-
for (i = 1; i < cell->bytes; i++) {
1621+
for (i = 1; i < (cell->bytes - bytes_offset); i++) {
16221622
/* Get bits from next byte and shift them towards msb */
16231623
*p++ |= *b << (BITS_PER_BYTE - bit_offset);
16241624

16251625
*p = *b++ >> bit_offset;
16261626
}
1627+
/* point to end of the buffer unused bits will be cleared */
1628+
p = buf + cell->bytes - 1;
16271629
} else if (p != b) {
16281630
memmove(p, b, cell->bytes - bytes_offset);
16291631
p += cell->bytes - 1;

0 commit comments

Comments
 (0)